home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / util / libs / PalmLink.lha / PalmLink / developer / palmlink.doc < prev   
Encoding:
Text File  |  1998-09-26  |  86.3 KB  |  3,192 lines

  1. TABLE OF CONTENTS
  2.  
  3. palmlink.library/--background--
  4. palmlink.library/DLP_AddSyncLogEntry
  5. palmlink.library/DLP_CleanUpDatabase
  6. palmlink.library/DLP_CloseAllDB
  7. palmlink.library/DLP_CloseDB
  8. palmlink.library/DLP_CountDBEntries
  9. palmlink.library/DLP_CreateDB
  10. palmlink.library/DLP_DeleteCategory
  11. palmlink.library/DLP_DeleteDB
  12. palmlink.library/DLP_DeleteRecord
  13. palmlink.library/DLP_DeleteResource
  14. palmlink.library/DLP_EndOfSync
  15. palmlink.library/DLP_GetDBInfo
  16. palmlink.library/DLP_GetNetSyncInfo
  17. palmlink.library/DLP_GetRecordIDList
  18. palmlink.library/DLP_GetStorageInfo
  19. palmlink.library/DLP_GetSysInfo
  20. palmlink.library/DLP_GetSysTime
  21. palmlink.library/DLP_GetUserInfo
  22. palmlink.library/DLP_MoveCategory
  23. palmlink.library/DLP_OpenConduit
  24. palmlink.library/DLP_OpenDB
  25. palmlink.library/DLP_ReadAppBlock
  26. palmlink.library/DLP_ReadAppPreference
  27. palmlink.library/DLP_ReadNextCatRecord
  28. palmlink.library/DLP_ReadNextModifiedCatRecord
  29. palmlink.library/DLP_ReadRecordByID
  30. palmlink.library/DLP_ReadRecordByIndex
  31. palmlink.library/DLP_ReadResourceByIndex
  32. palmlink.library/DLP_ReadResourceByType
  33. palmlink.library/DLP_ReadSortBlock
  34. palmlink.library/DLP_ResetDBIndex
  35. palmlink.library/DLP_ResetLastSyncPC
  36. palmlink.library/DLP_ResetSyncFlags
  37. palmlink.library/DLP_ResetSystem
  38. palmlink.library/DLP_SetNetSyncInfo
  39. palmlink.library/DLP_SetSysTime
  40. palmlink.library/DLP_SetUserInfo
  41. palmlink.library/DLP_WriteAppBlock
  42. palmlink.library/DLP_WriteAppPreference
  43. palmlink.library/DLP_WriteRecord
  44. palmlink.library/DLP_WriteResource
  45. palmlink.library/DLP_WriteSortBlock
  46. palmlink.library/PL_Accept
  47. palmlink.library/PL_CloseSocket
  48. palmlink.library/PL_CMPAbort
  49. palmlink.library/PL_CMPInit
  50. palmlink.library/PL_CMPRead
  51. palmlink.library/PL_CMPWakeUp
  52. palmlink.library/PL_Connect
  53. palmlink.library/PL_DLPInit
  54. palmlink.library/PL_DLPRead
  55. palmlink.library/PL_DLPSend
  56. palmlink.library/PL_DLPTstWrite
  57. palmlink.library/PL_DLPWrite
  58. palmlink.library/PL_DLPWriteByte
  59. palmlink.library/PL_DLPWriteLong
  60. palmlink.library/PL_DLPWriteWord
  61. palmlink.library/PL_Explain
  62. palmlink.library/PL_FileAddRecord
  63. palmlink.library/PL_FileAddResorce
  64. palmlink.library/PL_FileClose
  65. palmlink.library/PL_FileGetAppInfo
  66. palmlink.library/PL_FileGetDBInfo
  67. palmlink.library/PL_FileGetSortInfo
  68. palmlink.library/PL_FileInstall
  69. palmlink.library/PL_FileMerge
  70. palmlink.library/PL_FileOpen
  71. palmlink.library/PL_FileReadRecord
  72. palmlink.library/PL_FileReadRecordID
  73. palmlink.library/PL_FileReadResorce
  74. palmlink.library/PL_FileRetrieve
  75. palmlink.library/PL_FileSetAppInfo
  76. palmlink.library/PL_FileSetDBInfo
  77. palmlink.library/PL_FileSetSortInfo
  78. palmlink.library/PL_FileUsedID
  79. palmlink.library/PL_LastError
  80. palmlink.library/PL_OpenSocket
  81. palmlink.library/PL_PADPRead
  82. palmlink.library/PL_PADPWrite
  83. palmlink.library/PL_RawRead
  84. palmlink.library/PL_RawSetRate
  85. palmlink.library/PL_RawWrite
  86. palmlink.library/PL_Read
  87. palmlink.library/PL_SLPRead
  88. palmlink.library/PL_SLPWrite
  89. palmlink.library/PL_Tickle
  90. palmlink.library/PL_Write
  91.  
  92. palmlink.library/--background--
  93.  
  94.    NAME
  95.         palmlink.library
  96.  
  97.    DESCRIPTION
  98.         This library provides a connection to 3Com's Palm Pilot Personal,
  99.         Palm Pilot Professional or Palm III organizer. With appropriate
  100.         software, you are now able to use the HotSync feature on your
  101.         Amiga as well.
  102.  
  103.    REQUIREMENTS
  104.         PalmLink requires at least AmigaOS V2.04, a 68020 processor, and
  105.         a Palm organizer connected to any serial port of the Amiga.
  106.  
  107.         The palmlink.library requires at least 8192 byte of Stack, so
  108.         be prepared! Currently, you must call all function from the same
  109.         task that opened the socket.
  110.  
  111.    CONSTRUCTION
  112.         The lowest layer of PalmLink is the serial device itself. It is
  113.         controlled by all PL_RAW commands.
  114.  
  115.         Basing on the serial layer, the SLP (Serial Link Protocol) handles
  116.         the source and destination ID, and the message type. The maximum
  117.         size of SLP messages is 1024 byte.
  118.  
  119.         The PADP (Packet Assembly Disassembly Protocol) splits or joins
  120.         the data packets, respectively. It also attaches a transaction
  121.         ID so the packets can be joined properly. Anyhow, even the PADP
  122.         data packages are limited to 65536 byte.
  123.  
  124.         The CMP (Connection Management Protocol) controls the connection
  125.         between the Palm Pilot and the Amiga, as e.g. the baud rate used.
  126.  
  127.         Until here, the client usually does not need to call any functions.
  128.         The main API of the library consists of connection and data transfer
  129.         functions. They are based on BSD socket like functions, though they
  130.         are quite 'Amigized'.
  131.  
  132.         A high level protocol is the SYSPKT protocol. It is used for
  133.         debugging purposes. Currently it is not implemented to palmlink.
  134.         I will only implement it upon significant request.
  135.  
  136.         The client will use the DLP (Desktop Link Protocol) in most cases.
  137.         With this protocol, the Pilot's data base can be accessed and
  138.         manipulated. Basing on this, the client can do a backup of all
  139.         data as well as 'HotSync' the Scheduler, ToDo list, and other
  140.         data bases.
  141.  
  142.         Additionally, there are some functions that provide access to '.prc'
  143.         and '.pdb' files as data bases.
  144.  
  145.    BUGS
  146.         Currently, palmlink calls its own functions by a direct call. Thus,
  147.         patching library functions does not show any effect. Please don't
  148.         patch anything until further notice.
  149.  
  150.         The provided pointers are *not* checked against NULL yet. I strongly
  151.         suggest to use Enforcer during development.
  152.  
  153.    IMPORTANT
  154.         · Make sure that the stack is large enough (8192 byte at least)
  155.         · Currently, you MUST use all functions within the same task that
  156.           opened the socket to the Palm organizer.
  157.         · Do not manipulate READ ONLY fields!
  158.         · Do not use PRIVATE stuff!
  159.         · Do not assume a special value for TRUE. TRUE is anything except 0.
  160.  
  161.    COPYRIGHT
  162.         The palmlink.library is Copyright (C) 1998 by Richard Körber.
  163.         All rights reserved. Please read the main guide for further
  164.         information and the copyright note.
  165.  
  166.         palmlink.library is MailWare. You don't need to pay any fees, though
  167.         you must send me an e-mail if you use it.
  168.  
  169.         If it is used in commercial software (ShareWare is commercial as
  170.         well), you must provide me with a full featured and registered
  171.         release of your software, along with all future updates, as long
  172.         as you use the palmlink.library, and without any charge.
  173.  
  174.         E-Mail:  richard.koerber@koeln.netsurf.de
  175.                  shred@eratosthenes.starfleet.de
  176.  
  177.         WWW:     http://shredzone.home.pages.de/
  178.  
  179.    TRADEMARKS
  180.         Palm Pilot, Palm III and PalmOS are trademarks of 3Com.
  181.         3Com and HotSync are registered trademarks of 3Com.
  182.  
  183. palmlink.library/DLP_AddSyncLogEntry
  184.  
  185.    NAME
  186.         DLP_AddSyncLogEntry - Add an entry to the HotSync log
  187.  
  188.    SYNOPSIS
  189.         Success = DLP_AddSyncLogEntry(Socket,Entry)
  190.           D0.l                         A0.l  A1.l
  191.  
  192.         int DLP_AddSyncLogEntry(APTR,STRPTR);
  193.  
  194.    FUNCTION
  195.         Add an entry to the HotSync log. The user can read the last HotSync
  196.         log with the HotSync tool of the Palm Pilot.
  197.  
  198.    INPUTS
  199.         Socket        -- (APTR) Socket
  200.         Entry         -- (STRPTR) String to be added
  201.  
  202.    RESULT
  203.         Success       -- (int) TRUE: Entry has been added
  204.  
  205.    NOTE
  206.  
  207.    BUGS
  208.  
  209.    SEE ALSO
  210.  
  211.  
  212. palmlink.library/DLP_CleanUpDatabase
  213.  
  214.    NAME
  215.         DLP_CleanUpDatabase - Clean up the database
  216.  
  217.    SYNOPSIS
  218.         Success = DLP_CleanUpDatabase(Socket,DBHandle)
  219.           D0.l                         A0.l    D0.l
  220.  
  221.         int DLP_CleanUpDatabase(APTR,LONG);
  222.  
  223.    FUNCTION
  224.         Clean up the database.
  225.  
  226.    INPUTS
  227.         Socket        -- (APTR) Socket
  228.         DBHandle      -- (LONG) Handle of the database to be cleaned.
  229.  
  230.    RESULT
  231.         Success       -- (int) TRUE: this call succeeded. FALSE: an
  232.                 error occured (see PL_LastError()).
  233.  
  234.    NOTE
  235.  
  236.    BUGS
  237.  
  238.    SEE ALSO
  239.  
  240.  
  241. palmlink.library/DLP_CloseAllDB
  242.  
  243.    NAME
  244.         DLP_CloseAllDB - Close all opened databases
  245.  
  246.    SYNOPSIS
  247.         Success = DLP_CloseAllDB(Socket)
  248.           D0.l                    A0.l
  249.  
  250.         int DLP_CloseAllDB(APTR);
  251.  
  252.    FUNCTION
  253.         Closes all databases previously opened.
  254.  
  255.    INPUTS
  256.         Socket        -- (APTR) Socket
  257.  
  258.    RESULT
  259.         Success       -- (int) TRUE: all DB have been closed successfully
  260.  
  261.    NOTE
  262.  
  263.    BUGS
  264.  
  265.    SEE ALSO
  266.         DLP_CloseDB()
  267.  
  268.  
  269. palmlink.library/DLP_CloseDB
  270.  
  271.    NAME
  272.         DLP_CloseDB - Close a database
  273.  
  274.    SYNOPSIS
  275.         Success = DLP_CloseDB(Socket,DBHandle)
  276.           D0.l                 A0.l    D0.l
  277.  
  278.         int DLP_CloseDB(APTR,LONG);
  279.  
  280.    FUNCTION
  281.         Close a database.
  282.  
  283.    INPUTS
  284.         Socket        -- (APTR) Socket
  285.         DBHandle      -- (LONG) Handle of the database to close
  286.  
  287.    RESULT
  288.         Success       -- (int) TRUE: DB has been closed successfully
  289.  
  290.    NOTE
  291.  
  292.    BUGS
  293.  
  294.    SEE ALSO
  295.         DLP_OpenDB(), DLP_CreateDB(), DLP_DeleteDB(), DLP_CloseAllDB()
  296.  
  297.  
  298. palmlink.library/DLP_CountDBEntries
  299.  
  300.    NAME
  301.         DLP_CountDBEntries - Count the entries of a database
  302.  
  303.    SYNOPSIS
  304.         Number = DLP_CountDBEntries(Socket,DBHandle)
  305.          D0.l                        A0.l    D0.l
  306.  
  307.         LONG DLP_CountDBEntries(APTR,LONG);
  308.  
  309.    FUNCTION
  310.         Count the number of entries of a database. Use this function e.g.
  311.         if you want to read all entries of the database.
  312.  
  313.    INPUTS
  314.         Socket        -- (APTR) Socket
  315.         DBHandle      -- (LONG) Handle of the database to count
  316.  
  317.    RESULT
  318.         Number        -- (LONG) Number of entries, or -1 if an error
  319.                 occured (see PL_LastError()).
  320.  
  321.    NOTE
  322.  
  323.    BUGS
  324.  
  325.    SEE ALSO
  326.  
  327.  
  328. palmlink.library/DLP_CreateDB
  329.  
  330.    NAME
  331.         DLP_CreateDB - Create a new database
  332.  
  333.    SYNOPSIS
  334.         DBHandle = DLP_CreateDB(Socket,CardNo,Creator,Type,Flags,Version,Name)
  335.           D0.l                   A0.l   D0.b   D1.l   D2.l  D3.w  D4.w   A1.l
  336.  
  337.         LONG DLP_CreateDB(APTR,UBYTE,ULONG,ULONG,UWORD,UWORD,STRPTR);
  338.  
  339.    FUNCTION
  340.         Create a new database. The database handle is returned.
  341.  
  342.    INPUTS
  343.         Socket        -- (APTR) Socket
  344.         CardNo        -- (UBYTE) Card number of the database (usually 0)
  345.         Creator       -- (ULONG) ID of the DB creator. For own developments,
  346.                 you must register an ID from 3Com (see their web page).
  347.         Type          -- (ULONG) Type ID of the DB.
  348.         Flags         -- (UWORD) Flags (see includes)
  349.         Version       -- (UWORD) Version of the database
  350.         Name          -- (STRPTR) Name of the database to create
  351.  
  352.    RESULT
  353.         DBHandle      -- (LONG) Handle of the created data base, or -1
  354.                 if an error occured (see PL_LastError()).
  355.  
  356.    NOTE
  357.  
  358.    BUGS
  359.  
  360.    SEE ALSO
  361.         DLP_OpenDB(), DLP_DeleteDB(), DLP_CloseDB()
  362.  
  363.  
  364. palmlink.library/DLP_DeleteCategory
  365.  
  366.    NAME
  367.         DLP_DeleteCategory - Delete a record category from the database
  368.  
  369.    SYNOPSIS
  370.         Success = DLP_DeleteCategory(Socket,DBHandle,CatID)
  371.           D0.l                        A0.l    D0.l    D1.b
  372.  
  373.         int DLP_DeleteCategory(APTR,ULONG,BOOL);
  374.  
  375.    FUNCTION
  376.         Delete a record category from the database.
  377.  
  378.    INPUTS
  379.         Socket        -- (APTR) Socket
  380.         DBHandle      -- (LONG) Database handle
  381.         CatID         -- (UBYTE) Category ID to delete
  382.  
  383.    RESULT
  384.         Success       -- (int) TRUE: Category has been deleted.
  385.  
  386.    NOTE
  387.         This function requires PalmOS 2.0 or higher. There is workaround
  388.         for OS 1.0, but since it is quite outdated, I see no reason to
  389.         implement it. If you require it, please get in contact with me.
  390.  
  391.    BUGS
  392.  
  393.    SEE ALSO
  394.  
  395.  
  396. palmlink.library/DLP_DeleteDB
  397.  
  398.    NAME
  399.         DLP_DeleteDB - Delete a database
  400.  
  401.    SYNOPSIS
  402.         Success = DLP_DeleteDB(Socket,CardNo,Name)
  403.           D0.l                  A0.l   D0.b  A1.l
  404.  
  405.         int DLP_DeleteDB(APTR,UBYTE,STRPTR);
  406.  
  407.    FUNCTION
  408.         Delete a database.
  409.  
  410.    INPUTS
  411.         Socket        -- (APTR) Socket
  412.         CardNo        -- (UBYTE) Card number where the database is stored
  413.         Name          -- (STRPTR) Name of the database to be deleted
  414.  
  415.    RESULT
  416.         Success       -- (int) TRUE: DB has been deleted successfully
  417.  
  418.    NOTE
  419.  
  420.    BUGS
  421.  
  422.    SEE ALSO
  423.         DLP_OpenDB(), DLP_CreateDB(), DLP_CloseDB()
  424.  
  425.  
  426. palmlink.library/DLP_DeleteRecord
  427.  
  428.    NAME
  429.         DLP_DeleteRecord - Delete a record from the database
  430.  
  431.    SYNOPSIS
  432.         Success = DLP_DeleteRecord(Socket,DBHandle,All,ID)
  433.           D0.l                      A0.l   D0.l    D1.b D2.l
  434.  
  435.         int DLP_DeleteRecord(APTR,ULONG,BOOL,ULONG);
  436.  
  437.    FUNCTION
  438.         Delete a record from the database.
  439.  
  440.    INPUTS
  441.         Socket        -- (APTR) Socket
  442.         DBHandle      -- (LONG) Database handle
  443.         All           -- (BOOL) True: delete *all* records of this database
  444.         ID            -- (ULONG) Record ID to delete
  445.  
  446.    RESULT
  447.         Success       -- (int) TRUE: Record has been deleted.
  448.  
  449.    NOTE
  450.  
  451.    BUGS
  452.  
  453.    SEE ALSO
  454.  
  455.  
  456. palmlink.library/DLP_DeleteResource
  457.  
  458.    NAME
  459.         DLP_DeleteResource - Delete a resource from the database
  460.  
  461.    SYNOPSIS
  462.         Success = DLP_DeleteResource(Socket,DBHandle,All,Type,ID)
  463.           D0.l                        A0.l   D0.l    D1.b D2.l D3.w
  464.  
  465.         int DLP_DeleteResource(APTR,ULONG,BOOL,ULONG,UWORD);
  466.  
  467.    FUNCTION
  468.         Delete a resource from the database.
  469.  
  470.    INPUTS
  471.         Socket        -- (APTR) Socket
  472.         DBHandle      -- (LONG) Database handle
  473.         All           -- (BOOL) True: delete *all* resources of this database
  474.         Type          -- (ULONG) Resource Type
  475.         ID            -- (ULONG) Record ID
  476.  
  477.    RESULT
  478.         Success       -- (int) TRUE: Resource has been deleted.
  479.  
  480.    NOTE
  481.  
  482.    BUGS
  483.  
  484.    SEE ALSO
  485.  
  486.  
  487. palmlink.library/DLP_EndOfSync
  488.  
  489.    NAME
  490.         DLP_EndOfSync - Terminate all database accesses
  491.  
  492.    SYNOPSIS
  493.         Success = DLP_EndOfSync(Socket,Status)
  494.           D0.l                   A0.l   D0.w
  495.  
  496.         int DLP_EndOfSync(APTR,UWORD);
  497.  
  498.    FUNCTION
  499.         Closes the Pilot database. After you called this function, you
  500.         should close the connection.
  501.  
  502.         *NEVER* forget to call DLP_EndOfSync() when you called
  503.         DLP_OpenConduit(). PlamLink won't do this for you.
  504.  
  505.    INPUTS
  506.         Socket        -- (APTR) Socket
  507.         Status        -- (UWORD) Status code
  508.  
  509.    RESULT
  510.         Success       -- (int) TRUE: this call succeeded. FALSE: an
  511.                 error occured (see PL_LastError()).
  512.  
  513.    NOTE
  514.  
  515.    BUGS
  516.  
  517.    SEE ALSO
  518.         DLP_OpenConduit()
  519.  
  520.  
  521. palmlink.library/DLP_GetDBInfo
  522.  
  523.    NAME
  524.         DLP_GetDBInfo - Get information about the database
  525.  
  526.    SYNOPSIS
  527.         Success = DLP_GetDBInfo(Socket,CardNo,Flags,Index,Info)
  528.           D0.l                   A0.l   D0.b   D1.b  D2.w A1.l
  529.  
  530.         int DLP_GetDBInfo(APTR,UBYTE,UBYTE,UWORD,struct DLP_DBInfo *);
  531.  
  532.    FUNCTION
  533.         The passed DLP_DBInfo structure is filled with information
  534.         about the database with the number provided in Start.
  535.  
  536.    INPUTS
  537.         Socket        -- (APTR) Socket
  538.         CardNo        -- (UBYTE) Card to select (usually 0)
  539.         Flags         -- (UBYTE) Access flags (RAM or ROM), see
  540.                 include file.
  541.         Index         -- (UWORD) Database number to get information
  542.                 about. Start with 0, then proceed with Info.Index+1
  543.                 of each returned data base.
  544.         Info          -- (struct DLP_DBInfo *) DBInfo structure
  545.                 to be filled
  546.  
  547.    RESULT
  548.         Success       -- (int) TRUE: Information has been read.
  549.  
  550.    NOTE
  551.  
  552.    BUGS
  553.  
  554.    SEE ALSO
  555.  
  556.  
  557. palmlink.library/DLP_GetNetSyncInfo
  558.  
  559.    NAME
  560.         DLP_GetNetSyncInfo - Get information about net sync
  561.  
  562.    SYNOPSIS
  563.         Success = DLP_GetNetSyncInfo(Socket,NetSync)
  564.           D0.l                        A0.l   A1.l
  565.  
  566.         int DLP_GetNetSyncInfo(APTR,struct DLP_NetSyncInfo *);
  567.  
  568.    FUNCTION
  569.         Get information about net sync into the DLP_NetSyncInfo structure.
  570.  
  571.    INPUTS
  572.         Socket        -- (APTR) Socket
  573.         NetSync       -- (struct DLP_NetSyncInfo *) Buffer space for the
  574.                 NetSync structure.
  575.  
  576.    RESULT
  577.         Success       -- (int) TRUE: NetSyncInfo has been get.
  578.  
  579.    NOTE
  580.         This function requires PalmOS 2.0 or higher. There is workaround
  581.         for OS 1.0, but since it is quite outdated, I see no reason to
  582.         implement it. If you require it, please get in contact with me.
  583.  
  584.    BUGS
  585.  
  586.    SEE ALSO
  587.         DLP_SetNetSyncInfo()
  588.  
  589.  
  590. palmlink.library/DLP_GetRecordIDList
  591.  
  592.    NAME
  593.         DLP_GetRecordIDList - Get a list of all record IDs of this database
  594.  
  595.    SYNOPSIS
  596.         Number = DLP_GetRecordIDList(Socket,DBHandle,Sort,Start,Max,IDs)
  597.          D0.l                         A0.l    D0.l   D1.w D2.w  D3.w A1.l
  598.  
  599.         LONG DLP_GetRecordIDList(APTR,LONG,BOOL,UWORD,UWORD,ULONG *);
  600.  
  601.    FUNCTION
  602.         Get a list of all record IDs of this database.
  603.  
  604.    INPUTS
  605.         Socket        -- (APTR) Socket
  606.         DBHandle      -- (LONG) Database handle
  607.         Sort          -- (BOOL) The list is sorted
  608.         Start         -- (UWORD) Start record index
  609.         Max           -- (UWORD) Maximum number of entries that fit into
  610.                 the ID table
  611.         IDs           -- (ULONG *) ID table that will contain the record
  612.                 IDs after this call
  613.  
  614.    RESULT
  615.         Number        -- (LONG) Number of IDs that were written into the
  616.                 table, or -1 on error.
  617.  
  618.    NOTE
  619.  
  620.    BUGS
  621.  
  622.    SEE ALSO
  623.  
  624.  
  625. palmlink.library/DLP_GetStorageInfo
  626.  
  627.    NAME
  628.         DLP_GetStorageInfo - Get information about Pilot's memory
  629.  
  630.    SYNOPSIS
  631.         Success = DLP_GetStorageInfo(Socket,Info)
  632.           D0.l                        A0.l  A1.l
  633.  
  634.         int DLP_GetStorageInfo(APTR,struct DLP_StorageInfo *);
  635.  
  636.    FUNCTION
  637.         The passed DLP_StorageInfo structure is filled with information
  638.         about the Pilot's built-in memory cards.
  639.  
  640.    INPUTS
  641.         Socket        -- (APTR) Socket
  642.         Info          -- (struct DLP_StorageInfo *) StorageInfo structure
  643.                 to be filled
  644.  
  645.    RESULT
  646.         Success       -- (int) TRUE: Information has been read.
  647.  
  648.    NOTE
  649.  
  650.    BUGS
  651.  
  652.    SEE ALSO
  653.  
  654.  
  655. palmlink.library/DLP_GetSysInfo
  656.  
  657.    NAME
  658.         DLP_GetSysInfo - Get information about the Pilot
  659.  
  660.    SYNOPSIS
  661.         Success = DLP_GetSysInfo(Socket,Info)
  662.           D0.l                    A0.l  A1.l
  663.  
  664.         int DLP_GetSysInfo(APTR,struct DLP_SysInfo *);
  665.  
  666.    FUNCTION
  667.         The passed DLP_SysInfo structure is filled with information
  668.         about the Pilot's built-in memory cards.
  669.  
  670.    INPUTS
  671.         Socket        -- (APTR) Socket
  672.         Info          -- (struct DLP_SysInfo *) SysInfo structure
  673.                 to be filled
  674.  
  675.    RESULT
  676.         Success       -- (int) TRUE: Information has been read.
  677.  
  678.    NOTE
  679.  
  680.    BUGS
  681.  
  682.    SEE ALSO
  683.  
  684.  
  685. palmlink.library/DLP_GetSysTime
  686.  
  687.    NAME
  688.         DLP_GetSysTime - Get the Pilot system time
  689.  
  690.    SYNOPSIS
  691.         Success = DLP_GetSysTime(Socket,Time)
  692.           D0.l                    A0.l  A1.l
  693.  
  694.         int DLP_GetSysTime(APTR,struct DLP_SysTime *);
  695.  
  696.    FUNCTION
  697.         The passed DLP_SysTime structure is filled with the current
  698.         time of the Pilot's internal clock.
  699.  
  700.    INPUTS
  701.         Socket        -- (APTR) Socket
  702.         Time          -- (struct DLP_SysTime *) Time structure to be filled
  703.  
  704.    RESULT
  705.         Success       -- (int) TRUE: Time has been read.
  706.  
  707.    NOTE
  708.  
  709.    BUGS
  710.  
  711.    SEE ALSO
  712.         DLP_SetSysTime()
  713.  
  714.  
  715. palmlink.library/DLP_GetUserInfo
  716.  
  717.    NAME
  718.         DLP_GetUserInfo - Get information about the Pilot user
  719.  
  720.    SYNOPSIS
  721.         Success = DLP_GetUserInfo(Socket,User)
  722.           D0.l                     A0.l  A1.l
  723.  
  724.         int DLP_GetUserInfo(APTR,struct DLP_UserInfo *);
  725.  
  726.    FUNCTION
  727.         Get information about the Pilot user (most probably you ;-)
  728.         into the DLP_UserInfo structure.
  729.  
  730.    INPUTS
  731.         Socket        -- (APTR) Socket
  732.         User          -- (struct DLP_UserInfo *) Buffer space for
  733.                 the UserInfo.
  734.  
  735.    RESULT
  736.         Success       -- (int) TRUE: UserInfo has been get.
  737.  
  738.    NOTE
  739.  
  740.    BUGS
  741.  
  742.    SEE ALSO
  743.         DLP_SetUserInfo()
  744.  
  745.  
  746. palmlink.library/DLP_MoveCategory
  747.  
  748.    NAME
  749.         DLP_MoveCategory - Change a record category ID
  750.  
  751.    SYNOPSIS
  752.         Success = DLP_MoveCategory(Socket,DBHandle,OldID,NewID)
  753.          D0.l                       A0.l    D0.l    D1.b  D2.b
  754.  
  755.         int DLP_MoveCategory(APTR,LONG,UBYTE,UBYTE);
  756.  
  757.    FUNCTION
  758.         Changes a record cateogry ID of the selected database to the new
  759.         ID.
  760.  
  761.    INPUTS
  762.         Socket        -- (APTR) Socket
  763.         DBHandle      -- (LONG) Handle of the database
  764.         OldID         -- (UBYTE) Old record category ID
  765.         NewID         -- (UBYTE) New record category ID
  766.  
  767.    RESULT
  768.         Success       -- (int) TRUE: changed successfully
  769.  
  770.    NOTE
  771.  
  772.    BUGS
  773.  
  774.    SEE ALSO
  775.  
  776.  
  777. palmlink.library/DLP_OpenConduit
  778.  
  779.    NAME
  780.         DLP_OpenConduit - Initialize a database access
  781.  
  782.    SYNOPSIS
  783.         Success = DLP_OpenConduit(Socket)
  784.           D0.l                     A0.l
  785.  
  786.         int DLP_OpenConduit(APTR);
  787.  
  788.    FUNCTION
  789.         Open the Pilot database for access. You must call this function
  790.         once, before you call any other DLP_* function.
  791.  
  792.    INPUTS
  793.         Socket        -- (APTR) Socket
  794.  
  795.    RESULT
  796.         Success       -- (int) FALSE: The Conduit couldn't be opened
  797.                 (see PL_LastError()).
  798.  
  799.    NOTE
  800.  
  801.    BUGS
  802.  
  803.    SEE ALSO
  804.         DLP_EndOfSync()
  805.  
  806.  
  807. palmlink.library/DLP_OpenDB
  808.  
  809.    NAME
  810.         DLP_OpenDB - Open an existing database
  811.  
  812.    SYNOPSIS
  813.         DBHandle = DLP_OpenDB(Socket,CardNo,Mode,Name)
  814.           D0.l                 A0.l   D0.b  D1.b A1.l
  815.  
  816.         LONG DLP_OpenDB(APTR,UBYTE,UBYTE,STRPTR);
  817.  
  818.    FUNCTION
  819.         Open an existing database with the name Name and mode Mode. The
  820.         database handle is returned.
  821.  
  822.    INPUTS
  823.         Socket        -- (APTR) Socket
  824.         CardNo        -- (UBYTE) Card number of the database (usually 0)
  825.         Mode          -- (UBYTE) Access mode (see includes)
  826.         Name          -- (STRPTR) Name of the database to open
  827.  
  828.    RESULT
  829.         DBHandle      -- (LONG) Handle of the opened data base, or -1
  830.                 if an error occured (see PL_LastError()).
  831.  
  832.    NOTE
  833.  
  834.    BUGS
  835.  
  836.    SEE ALSO
  837.         DLP_CreateDB(), DLP_DeleteDB(), DLP_CloseDB()
  838.  
  839.  
  840. palmlink.library/DLP_ReadAppBlock
  841.  
  842.    NAME
  843.         DLP_ReadAppBlock - Read an application block
  844.  
  845.    SYNOPSIS
  846.         Length = DLP_ReadAppBlock(Socket,DBHandle,Offset,Buffer,Length)
  847.           D0.l                     A0.l    D0.l    D1.w   A1.l   D2.w
  848.  
  849.         LONG DLP_ReadAppBlock(APTR,LONG,UWORD,APTR,UWORD);
  850.  
  851.    FUNCTION
  852.         Read the application block of the database.
  853.  
  854.    INPUTS
  855.         Socket        -- (APTR) Socket
  856.         DBHandle      -- (LONG) Database handle
  857.         Offset        -- (UWORD) Offset into the application block
  858.         Buffer        -- (APTR) Buffer for the application block
  859.         Length        -- (UWORD) Length of the buffer. As you see, the maximum
  860.                 size is 65535 byte.
  861.  
  862.    RESULT
  863.         Length        -- (LONG) AppBlock bytes that were really read, or -1 if
  864.                 an error occured.
  865.  
  866.    NOTE
  867.  
  868.    BUGS
  869.  
  870.    SEE ALSO
  871.  
  872.  
  873. palmlink.library/DLP_ReadAppPreference
  874.  
  875.    NAME
  876.         DLP_ReadAppPreference - Read the preference of an application
  877.  
  878.    SYNOPSIS
  879.         Length = DLP_ReadAppPreference(Socket,Creator,ID,Saved,MaxSize,Buffer,Size,Version)
  880.          D0.l                           A0.l   D0.l  D1.w D2.w  D3.w    A1.l  A2.l   A3.l
  881.  
  882.         LONG DLP_ReadAppPreference(APTR,ULONG,UWORD,BOOL,UWORD,APTR,UWORD *,UWORD *);
  883.  
  884.    FUNCTION
  885.         Read the preferences of an application. You can choose between the
  886.         saved and the temporary version of the preference.
  887.  
  888.    INPUTS
  889.         Socket        -- (APTR) Socket
  890.         Creator       -- (ULONG) Creator of the application
  891.         ID            -- (UWORD) ID number of the preference (lets an
  892.                 application have multiple preferences)
  893.         Saved         -- (BOOL) TRUE: use the saved preferences, FALSE: use
  894.                 the current preferences.
  895.         MaxSize       -- (UWORD) Size of the buffer
  896.         Buffer        -- (APTR) Buffer where the preferences are stored
  897.         Size          -- (UWORD *) If a pointer is provided, the size of the
  898.                 preference block is stored there. You may provide NULL.
  899.         Version       -- (UWORD *) If a pointer is provided, the version of
  900.                 the preference block is stored there. You may provide NULL.
  901.  
  902.    RESULT
  903.         Length        -- (LONG) Number of bytes that were really read, or -1
  904.                 if an error occured.
  905.  
  906.    NOTE
  907.         This function requires PalmOS 2.0 or higher. There is workaround
  908.         for OS 1.0, but since it is quite outdated, I see no reason to
  909.         implement it. If you require it, please get in contact with me.
  910.  
  911.    BUGS
  912.  
  913.    SEE ALSO
  914.  
  915.  
  916. palmlink.library/DLP_ReadNextCatRecord
  917.  
  918.    NAME
  919.         DLP_ReadNextCatRecord - Read the next record of a category
  920.  
  921.    SYNOPSIS
  922.         Length = DLP_ReadNextCatRecord(Socket,DBHandle,Cat,Buffer,ID,Index,Size,Attr)
  923.           D0.l                          A0.l    D0.l  D1.b  A1.l A2.l A3.l D2.l D3.l
  924.  
  925.         LONG DLP_ReadNextCatRecord(APTR,ULONG,UBYTE,APTR,ULONG *,UWORD *,UWORD *,UBYTE *);
  926.  
  927.    FUNCTION
  928.         Read the next record of a given category.
  929.  
  930.    INPUTS
  931.         Socket        -- (APTR) Socket
  932.         DBHandle      -- (LONG) Database handle
  933.         Cat           -- (UBYTE) Category ID
  934.         Buffer        -- (APTR) Buffer for the record. The buffer must have
  935.                 a sufficient size of 65535 byte.
  936.         ID            -- (ULONG *) If a pointer is provided, the record ID
  937.                 is copied there. You may provide NULL.
  938.         Index         -- (UWORD *) If a pointer is provided, the record index
  939.                 is copied there. You may provide NULL.
  940.         Size          -- (UWORD *) If a pointer is provided, the UWORD is filled
  941.                 with the size of this resource. You may provide NULL.
  942.                 Assembler users watch out: this is a pointer in a data register!
  943.         Attr          -- (UBYTE *) If a pointer is provided, the UBYTE is filled
  944.                 with the record attributes. You may provide NULL.
  945.                 Assembler users watch out: this is a pointer in a data register!
  946.  
  947.    RESULT
  948.         Length        -- (LONG) Record bytes that were really read, or -1 if
  949.                 an error occured.
  950.  
  951.    NOTE
  952.         This function requires PalmOS 2.0 or higher. There is workaround
  953.         for OS 1.0, but since it is quite outdated, I see no reason to
  954.         implement it. If you require it, please get in contact with me.
  955.  
  956.    BUGS
  957.  
  958.    SEE ALSO
  959.  
  960.  
  961. palmlink.library/DLP_ReadNextModifiedCatRecord
  962.  
  963.    NAME
  964.         DLP_ReadNextModifiedCatRecord - Read the next modified record of a category
  965.  
  966.    SYNOPSIS
  967.         Length = DLP_ReadNextModifiedCatRecord(Socket,DBHandle,Cat,Buffer,ID,Index,Size,Attr)
  968.           D0.l                                  A0.l    D0.l  D1.b  A1.l A2.l A3.l D2.l D3.l
  969.  
  970.         LONG DLP_ReadNextModifiedCatRecord(APTR,ULONG,UBYTE,APTR,ULONG *,UWORD *,UWORD *,UBYTE *);
  971.  
  972.    FUNCTION
  973.         Read the next modified record of a given category.
  974.  
  975.    INPUTS
  976.         Socket        -- (APTR) Socket
  977.         DBHandle      -- (LONG) Database handle
  978.         Cat           -- (UBYTE) Category ID
  979.         Buffer        -- (APTR) Buffer for the record. The buffer must have
  980.                 a sufficient size of 65535 byte.
  981.         ID            -- (ULONG *) If a pointer is provided, the record ID
  982.                 is copied there. You may provide NULL.
  983.         Index         -- (UWORD *) If a pointer is provided, the record index
  984.                 is copied there. You may provide NULL.
  985.         Size          -- (UWORD *) If a pointer is provided, the UWORD is filled
  986.                 with the size of this resource. You may provide NULL.
  987.                 Assembler users watch out: this is a pointer in a data register!
  988.         Attr          -- (UBYTE *) If a pointer is provided, the UBYTE is filled
  989.                 with the record attributes. You may provide NULL.
  990.                 Assembler users watch out: this is a pointer in a data register!
  991.  
  992.    RESULT
  993.         Length        -- (LONG) Record bytes that were really read, or -1 if
  994.                 an error occured.
  995.  
  996.    NOTE
  997.         This function requires PalmOS 2.0 or higher. There is workaround
  998.         for OS 1.0, but since it is quite outdated, I see no reason to
  999.         implement it. If you require it, please get in contact with me.
  1000.  
  1001.         No, there is no longer function name in this library. ;-)
  1002.  
  1003.    BUGS
  1004.  
  1005.    SEE ALSO
  1006.  
  1007.  
  1008. palmlink.library/DLP_ReadRecordByID
  1009.  
  1010.    NAME
  1011.         DLP_ReadRecordByID - Read a record by ID
  1012.  
  1013.    SYNOPSIS
  1014.         Length = DLP_ReadRecordByID(Socket,DBHandle,ID,Buffer,Index,Size,Attr,Cat);
  1015.          D0.l                        A0.l    D0.l  D1.l A1.l  A2.l  A3.l D2.l D3.l
  1016.  
  1017.         LONG DLP_ReadRecordByID(APTR,LONG,ULONG,APTR,UWORD *,UWORD *,UBYTE *,UBYTE *);
  1018.  
  1019.    FUNCTION
  1020.         Read a record from the database, by its ID.
  1021.  
  1022.    INPUTS
  1023.         Socket        -- (APTR) Socket
  1024.         DBHandle      -- (LONG) Database handle
  1025.         ID            -- (ULONG) Record ID
  1026.         Buffer        -- (APTR) Buffer for the record. The buffer must have
  1027.                 a sufficient size of 65535 byte.
  1028.         Index         -- (UWORD *) If a pointer is provided, the record index
  1029.                 is copied there. You may provide NULL.
  1030.         Size          -- (UWORD *) If a pointer is provided, the UWORD is filled
  1031.                 with the size of this record. You may provide NULL.
  1032.         Attr          -- (UBYTE *) If a pointer is provided, the record attribute
  1033.                 is copied there. You may provide NULL.
  1034.                 Assembler users watch out: this is a pointer in a data register!
  1035.         Cat           -- (UBYTE *) If a pointer is provided, the record category
  1036.                 is copied there. You may provide NULL.
  1037.                 Assembler users watch out: this is a pointer in a data register!
  1038.  
  1039.  
  1040.    RESULT
  1041.         Length        -- (LONG) Record bytes that were really read, or -1 if
  1042.                 an error occured.
  1043.  
  1044.    NOTE
  1045.  
  1046.    BUGS
  1047.  
  1048.    SEE ALSO
  1049.  
  1050.  
  1051. palmlink.library/DLP_ReadRecordByIndex
  1052.  
  1053.    NAME
  1054.         DLP_ReadRecordByIndex - Read a record by Index
  1055.  
  1056.    SYNOPSIS
  1057.         Length = DLP_ReadRecordByIndex(Socket,DBHandle,Index,Buffer,ID,Size,Attr,Cat);
  1058.          D0.l                           A0.l    D0.l    D1.l A1.l  A2.l A3.l D2.l D3.l
  1059.  
  1060.         LONG DLP_ReadRecordByIndex(APTR,LONG,UWORD,APTR,ULONG *,UWORD *,UBYTE *,UBYTE *);
  1061.  
  1062.    FUNCTION
  1063.         Read a record from the database, by its index.
  1064.  
  1065.    INPUTS
  1066.         Socket        -- (APTR) Socket
  1067.         DBHandle      -- (LONG) Database handle
  1068.         Index         -- (UWORD) Index of the record
  1069.         Buffer        -- (APTR) Buffer for the record. The buffer must have
  1070.                 a sufficient size of 65535 byte.
  1071.         ID            -- (ULONG *) If a pointer is provided, the record ID
  1072.                 is copied there. You may provide NULL.
  1073.         Size          -- (UWORD *) If a pointer is provided, the UWORD is filled
  1074.                 with the size of this record. You may provide NULL.
  1075.         Attr          -- (UBYTE *) If a pointer is provided, the record attribute
  1076.                 is copied there. You may provide NULL.
  1077.                 Assembler users watch out: this is a pointer in a data register!
  1078.         Cat           -- (UBYTE *) If a pointer is provided, the record category
  1079.                 is copied there. You may provide NULL.
  1080.                 Assembler users watch out: this is a pointer in a data register!
  1081.  
  1082.  
  1083.    RESULT
  1084.         Length        -- (LONG) Record bytes that were really read, or -1 if
  1085.                 an error occured.
  1086.  
  1087.    NOTE
  1088.  
  1089.    BUGS
  1090.  
  1091.    SEE ALSO
  1092.  
  1093.  
  1094. palmlink.library/DLP_ReadResourceByIndex
  1095.  
  1096.    NAME
  1097.         DLP_ReadResourceByIndex - Read a resource by index
  1098.  
  1099.    SYNOPSIS
  1100.         Length = DLP_ReadResourceByIndex(Socket,DBHandle,Index,Buffer,Type,ID,Size)
  1101.           D0.l                            A0.l    D0.l    D1.w  A1.l  A2.l A3.l D2.l
  1102.  
  1103.         LONG DLP_ReadResourceByIndex(APTR,LONG,UWORD,APTR,ULONG *,UWORD *,UWORD *);
  1104.  
  1105.    FUNCTION
  1106.         Read a resource from the database, by its index.
  1107.  
  1108.    INPUTS
  1109.         Socket        -- (APTR) Socket
  1110.         DBHandle      -- (LONG) Database handle
  1111.         Index         -- (UWORD) Index of the resource
  1112.         Buffer        -- (APTR) Buffer for the resource. The buffer must have
  1113.                 a sufficient size of 65535 byte.
  1114.         Type          -- (ULONG *) If a pointer is provided, the resource type
  1115.                 is copied there. You may provide NULL.
  1116.         ID            -- (UWORD *) If a pointer is provided, the resource ID
  1117.                 is copied there. You may provide NULL.
  1118.         Size          -- (UWORD *) If a pointer is provided, the UWORD is filled
  1119.                 with the size of this resource. You may provide NULL.
  1120.                 Assembler users watch out: this is a pointer in a data register!
  1121.  
  1122.    RESULT
  1123.         Length        -- (LONG) Resource bytes that were really read, or -1 if
  1124.                 an error occured.
  1125.  
  1126.    NOTE
  1127.  
  1128.    BUGS
  1129.  
  1130.    SEE ALSO
  1131.  
  1132.  
  1133. palmlink.library/DLP_ReadResourceByType
  1134.  
  1135.    NAME
  1136.         DLP_ReadResourceByType - Read a resource by its type
  1137.  
  1138.    SYNOPSIS
  1139.         Length = DLP_ReadResourceByType(Socket,DBHandle,Type,ID,Buffer,Index,Size)
  1140.           D0.l                           A0.l   D0.l    D1.l D2.w A1.l  A2.l A3.l
  1141.  
  1142.         LONG DLP_ReadResourceByType(APTR,LONG,ULONG,UWORD,APTR,UWORD *,UWORD *);
  1143.  
  1144.    FUNCTION
  1145.         Read a resource from the database, by its type and ID.
  1146.  
  1147.    INPUTS
  1148.         Socket        -- (APTR) Socket
  1149.         DBHandle      -- (LONG) Database handle
  1150.         Type          -- (ULONG) Resource type
  1151.         ID            -- (UWORD) Resource ID
  1152.         Buffer        -- (APTR) Buffer for the resource. The buffer must have
  1153.                 a sufficient size of 65535 byte.
  1154.         Index         -- (UWORD *) If a pointer is provided, the UWORD is filled
  1155.                 with the index of this resource. You may provide NULL.
  1156.         Size          -- (UWORD *) If a pointer is provided, the UWORD is filled
  1157.                 with the size of this resource. You may provide NULL.
  1158.  
  1159.    RESULT
  1160.         Length        -- (LONG) Resource bytes that were really read, or -1 if
  1161.                 an error occured.
  1162.  
  1163.    NOTE
  1164.  
  1165.    BUGS
  1166.  
  1167.    SEE ALSO
  1168.  
  1169.  
  1170. palmlink.library/DLP_ReadSortBlock
  1171.  
  1172.    NAME
  1173.         DLP_ReadSortBlock - Read a sort block
  1174.  
  1175.    SYNOPSIS
  1176.         Length = DLP_ReadSortBlock(Socket,DBHandle,Offset,Buffer,Length)
  1177.           D0.l                      A0.l    D0.l    D1.w   A1.l   D2.w
  1178.  
  1179.         LONG DLP_ReadSortBlock(APTR,LONG,UWORD,APTR,UWORD);
  1180.  
  1181.    FUNCTION
  1182.         Read the sort block of the database.
  1183.  
  1184.    INPUTS
  1185.         Socket        -- (APTR) Socket
  1186.         DBHandle      -- (LONG) Database handle
  1187.         Offset        -- (UWORD) Offset into the sort block
  1188.         Buffer        -- (APTR) Buffer for the sort block
  1189.         Length        -- (UWORD) Length of the buffer. As you see, the maximum
  1190.                 size is 65535 byte.
  1191.  
  1192.    RESULT
  1193.         Length        -- (LONG) SortBlock bytes that were really read, or -1 if
  1194.                 an error occured.
  1195.  
  1196.    NOTE
  1197.  
  1198.    BUGS
  1199.  
  1200.    SEE ALSO
  1201.  
  1202.  
  1203. palmlink.library/DLP_ResetDBIndex
  1204.  
  1205.    NAME
  1206.         DLP_ResetDBIndex - Restart from the first DB entry
  1207.  
  1208.    SYNOPSIS
  1209.         Success = DLP_ResetDBIndex(Socket,DBHandle)
  1210.           D0.l                      A0.l    D0.l
  1211.  
  1212.         int DLP_ResetDBIndex(APTR,LONG);
  1213.  
  1214.    FUNCTION
  1215.         Resets the internal DB index counter to the start of the
  1216.         database.
  1217.  
  1218.    INPUTS
  1219.         Socket        -- (APTR) Socket
  1220.         DBHandle      -- (LONG) Database handle
  1221.  
  1222.    RESULT
  1223.         Success       -- (int) FALSE: an error occured, see PL_LastError()
  1224.  
  1225.    NOTE
  1226.  
  1227.    BUGS
  1228.  
  1229.    SEE ALSO
  1230.  
  1231.  
  1232. palmlink.library/DLP_ResetLastSyncPC
  1233.  
  1234.    NAME
  1235.         DLP_ResetLastSyncPC - Clears the LastSyncPC
  1236.  
  1237.    SYNOPSIS
  1238.         Success = DLP_ResetLastSyncPC(Socket)
  1239.           D0.l                         A0.l
  1240.  
  1241.         int DLP_ResetLastSyncPC(APTR);
  1242.  
  1243.    FUNCTION
  1244.         Reset the LastSyncPC field in the UserInfo.
  1245.  
  1246.    INPUTS
  1247.         Socket        -- (APTR) Socket
  1248.  
  1249.    RESULT
  1250.         Success       -- (int) FALSE: an error occured, see PL_LastError()
  1251.  
  1252.    NOTE
  1253.  
  1254.    BUGS
  1255.  
  1256.    SEE ALSO
  1257.  
  1258.  
  1259. palmlink.library/DLP_ResetSyncFlags
  1260.  
  1261.    NAME
  1262.         DLP_ResetSyncFlags - Reset all sync flags of the database
  1263.  
  1264.    SYNOPSIS
  1265.         Success = DLP_ResetSyncFlags(Socket,DBHandle)
  1266.           D0.l                        A0.l    D0.l
  1267.  
  1268.         int DLP_ResetSyncFlags(APTR,LONG);
  1269.  
  1270.    FUNCTION
  1271.         All sync flags of the database are reset.
  1272.  
  1273.    INPUTS
  1274.         Socket        -- (APTR) Socket
  1275.         DBHandle      -- (LONG) Handle of the database.
  1276.  
  1277.    RESULT
  1278.         Success       -- (int) TRUE: this call succeeded. FALSE: an
  1279.                 error occured (see PL_LastError()).
  1280.  
  1281.    NOTE
  1282.  
  1283.    BUGS
  1284.  
  1285.    SEE ALSO
  1286.  
  1287.  
  1288. palmlink.library/DLP_ResetSystem
  1289.  
  1290.    NAME
  1291.         DLP_ResetSystem - Reset the Palm Pilot
  1292.  
  1293.    SYNOPSIS
  1294.         Success = DLP_ResetSystem(Socket)
  1295.           D0.l                     A0.l
  1296.  
  1297.         int DLP_ResetSystem(APTR);
  1298.  
  1299.    FUNCTION
  1300.         Reset the Palm Pilot when the connection is closed.
  1301.  
  1302.    INPUTS
  1303.         Socket        -- (APTR) Socket
  1304.  
  1305.    RESULT
  1306.         Success       -- (int) FALSE: an error occured, see PL_LastError()
  1307.  
  1308.    NOTE
  1309.  
  1310.    BUGS
  1311.  
  1312.    SEE ALSO
  1313.  
  1314.  
  1315. palmlink.library/DLP_SetNetSyncInfo
  1316.  
  1317.    NAME
  1318.         DLP_SetNetSyncInfo - Set information about net sync
  1319.  
  1320.    SYNOPSIS
  1321.         Success = DLP_SetNetSyncInfo(Socket,NetSync)
  1322.           D0.l                        A0.l   A1.l
  1323.  
  1324.         int DLP_SetNetSyncInfo(APTR,struct DLP_NetSyncInfo *);
  1325.  
  1326.    FUNCTION
  1327.         Set information about net sync from the DLP_NetSyncInfo structure.
  1328.  
  1329.    INPUTS
  1330.         Socket        -- (APTR) Socket
  1331.         NetSync       -- (struct DLP_NetSyncInfo *) NetSync to be set
  1332.  
  1333.    RESULT
  1334.         Success       -- (int) TRUE: NetSyncInfo has been set.
  1335.  
  1336.    NOTE
  1337.         This function requires PalmOS 2.0 or higher. There is workaround
  1338.         for OS 1.0, but since it is quite outdated, I see no reason to
  1339.         implement it. If you require it, please get in contact with me.
  1340.  
  1341.    BUGS
  1342.  
  1343.    SEE ALSO
  1344.         DLP_GetNetSyncInfo()
  1345.  
  1346.  
  1347. palmlink.library/DLP_SetSysTime
  1348.  
  1349.    NAME
  1350.         DLP_SetSysTime - Set the Pilot system time
  1351.  
  1352.    SYNOPSIS
  1353.         Success = DLP_SetSysTime(Socket,Time)
  1354.           D0.l                    A0.l  A1.l
  1355.  
  1356.         int DLP_SetSysTime(APTR,struct DLP_SysTime *);
  1357.  
  1358.    FUNCTION
  1359.         The internal clock of the Palm Pilot is set according to the
  1360.         passed DLP_SysTime structure.
  1361.  
  1362.    INPUTS
  1363.         Socket        -- (APTR) Socket
  1364.         Time          -- (struct DLP_SysTime *) Time to set
  1365.  
  1366.    RESULT
  1367.         Success       -- (int) TRUE: Time has been set.
  1368.  
  1369.    NOTE
  1370.  
  1371.    BUGS
  1372.  
  1373.    SEE ALSO
  1374.         DLP_GetSysTime()
  1375.  
  1376.  
  1377. palmlink.library/DLP_SetUserInfo
  1378.  
  1379.    NAME
  1380.         DLP_SetUserInfo - Set information about the Pilot user
  1381.  
  1382.    SYNOPSIS
  1383.         Success = DLP_SetUserInfo(Socket,User)
  1384.           D0.l                     A0.l  A1.l
  1385.  
  1386.         int DLP_SetUserInfo(APTR,struct DLP_UserInfo *);
  1387.  
  1388.    FUNCTION
  1389.         Set information about the Pilot user (most probably you ;-)
  1390.         from the DLP_UserInfo structure.
  1391.  
  1392.    INPUTS
  1393.         Socket        -- (APTR) Socket
  1394.         User          -- (struct DLP_UserInfo *) UserInfo to be set
  1395.  
  1396.    RESULT
  1397.         Success       -- (int) TRUE: UserInfo has been set.
  1398.  
  1399.    NOTE
  1400.  
  1401.    BUGS
  1402.  
  1403.    SEE ALSO
  1404.         DLP_GetUserInfo()
  1405.  
  1406.  
  1407. palmlink.library/DLP_WriteAppBlock
  1408.  
  1409.    NAME
  1410.         DLP_WriteAppBlock - Write an application block
  1411.  
  1412.    SYNOPSIS
  1413.         Success = DLP_WriteAppBlock(Socket,DBHandle,Buffer,Length)
  1414.           D0.l                      A0.l    D0.l    A1.l   D1.w
  1415.  
  1416.         int DLP_WriteAppBlock(APTR,LONG,APTR,UWORD);
  1417.  
  1418.    FUNCTION
  1419.         Write the application block into the database.
  1420.  
  1421.    INPUTS
  1422.         Socket        -- (APTR) Socket
  1423.         DBHandle      -- (LONG) Database handle
  1424.         Buffer        -- (APTR) Buffer for the application block
  1425.         Length        -- (UWORD) Length of the buffer. As you see, the maximum
  1426.                 size is 65535 byte.
  1427.  
  1428.    RESULT
  1429.         Success       -- (int) TRUE: AppBlock has been written successfully
  1430.  
  1431.    NOTE
  1432.  
  1433.    BUGS
  1434.  
  1435.    SEE ALSO
  1436.  
  1437.  
  1438. palmlink.library/DLP_WriteAppPreference
  1439.  
  1440.    NAME
  1441.         DLP_WriteAppPreference - Write the preference of an application
  1442.  
  1443.    SYNOPSIS
  1444.         Success = DLP_WriteAppPreference(Socket,Creator,ID,Saved,Version,Buffer,Length)
  1445.           D0.l                            A0.l   D0.l  D1.w D2.w  D3.w    A1.l   D4.w
  1446.  
  1447.         int DLP_WriteAppPreference(APTR,ULONG,UWORD,BOOL,UWORD,APTR,UWORD);
  1448.  
  1449.    FUNCTION
  1450.         Write the preferences of an application. You can choose between the
  1451.         saved and the temporary version of the preference.
  1452.  
  1453.    INPUTS
  1454.         Socket        -- (APTR) Socket
  1455.         Creator       -- (ULONG) Creator of the application
  1456.         ID            -- (UWORD) ID number of the preference (lets an
  1457.                 application have multiple preferences)
  1458.         Saved         -- (BOOL) TRUE: save the preference, FALSE: use
  1459.                 the preference as current settings.
  1460.         Version       -- (UWORD) Preference version
  1461.         Buffer        -- (APTR) Buffer where the preferences are stored
  1462.         Length        -- (UWORD) Length of the preference block
  1463.  
  1464.    RESULT
  1465.         Success       -- (int) TRUE: Preference has been set successfully.
  1466.  
  1467.    NOTE
  1468.         This function requires PalmOS 2.0 or higher. There is workaround
  1469.         for OS 1.0, but since it is quite outdated, I see no reason to
  1470.         implement it. If you require it, please get in contact with me.
  1471.  
  1472.    BUGS
  1473.  
  1474.    SEE ALSO
  1475.  
  1476.  
  1477. palmlink.library/DLP_WriteRecord
  1478.  
  1479.    NAME
  1480.         DLP_WriteRecord - Write a record to the database
  1481.  
  1482.    SYNOPSIS
  1483.         Success = DLP_WriteRecord(Socket,DBHandle,Flags,ID,CatID,Buffer,Length,NewID)
  1484.           D0.l                     A0.l   D0.l    D1.b D2.l D3.b  A1.l   D4.w   A2.l
  1485.  
  1486.         int DLP_WriteRecord(APTR,LONG,UBYTE,ULONG,UBYTE,APTR,UWORD,ULONG *);
  1487.  
  1488.    FUNCTION
  1489.         Write a record to the database.
  1490.  
  1491.    INPUTS
  1492.         Socket        -- (APTR) Socket
  1493.         DBHandle      -- (LONG) Database handle
  1494.         Flags         -- (UBYTE) Write flags (see includes)
  1495.         ID            -- (ULONG) Record ID
  1496.         CatID         -- (UBYTE) Record Category ID
  1497.         Buffer        -- (APTR) Data to write to the record
  1498.         Length        -- (UWORD) Length of the buffer (as you see, a record
  1499.                 can only contain 65535 byte).
  1500.         NewID         -- (ULONG *) The record ID that has been used can be
  1501.                 returned in this buffer. Provide NULL if you don't need it.
  1502.  
  1503.    RESULT
  1504.         Success       -- (int) TRUE: Record has bee written.
  1505.  
  1506.    NOTE
  1507.  
  1508.    BUGS
  1509.  
  1510.    SEE ALSO
  1511.  
  1512.  
  1513. palmlink.library/DLP_WriteResource
  1514.  
  1515.    NAME
  1516.         DLP_WriteResource - Write a resource to the database
  1517.  
  1518.    SYNOPSIS
  1519.         Success = DLP_WriteResource(Socket,DBHandle,Type,ID,Buffer,Length)
  1520.           D0.l                       A0.l   D0.l    D1.l D2.w A1.l  D3.w
  1521.  
  1522.         int DLP_WriteResource(APTR,LONG,ULONG,UWORD,APTR,UWORD);
  1523.  
  1524.    FUNCTION
  1525.         Write a resource to the database.
  1526.  
  1527.    INPUTS
  1528.         Socket        -- (APTR) Socket
  1529.         DBHandle      -- (LONG) Database handle
  1530.         Type          -- (ULONG) Resource type
  1531.         ID            -- (UWORD) Resource ID
  1532.         Buffer        -- (APTR) Data to write to the resource
  1533.         Length        -- (UWORD) Length of the buffer (as you see, a resource
  1534.                 can only contain 65535 byte).
  1535.  
  1536.    RESULT
  1537.         Success       -- (int) TRUE: Resource has been written.
  1538.  
  1539.    NOTE
  1540.  
  1541.    BUGS
  1542.  
  1543.    SEE ALSO
  1544.  
  1545.  
  1546. palmlink.library/DLP_WriteSortBlock
  1547.  
  1548.    NAME
  1549.         DLP_WriteSortBlock - Write a sort block
  1550.  
  1551.    SYNOPSIS
  1552.         Success = DLP_WriteSortBlock(Socket,DBHandle,Buffer,Length)
  1553.           D0.l                       A0.l    D0.l    A1.l   D1.w
  1554.  
  1555.         int DLP_WriteSortBlock(APTR,LONG,APTR,UWORD);
  1556.  
  1557.    FUNCTION
  1558.         Write the sort block into the database.
  1559.  
  1560.    INPUTS
  1561.         Socket        -- (APTR) Socket
  1562.         DBHandle      -- (LONG) Database handle
  1563.         Buffer        -- (APTR) Buffer for the sort block
  1564.         Length        -- (UWORD) Length of the buffer. As you see, the maximum
  1565.                 size is 65535 byte.
  1566.  
  1567.    RESULT
  1568.         Success       -- (int) TRUE: SortBlock has been written successfully
  1569.  
  1570.    NOTE
  1571.  
  1572.    BUGS
  1573.  
  1574.    SEE ALSO
  1575.  
  1576.  
  1577. palmlink.library/PL_Accept
  1578.  
  1579.    NAME
  1580.         PL_Accept - accept a connection
  1581.  
  1582.    SYNOPSIS
  1583.         Success = PL_Accept(Socket, Timeout)
  1584.         D0.l                 A0.l    D0.l
  1585.  
  1586.         int PL_Accept(APTR, ULONG);
  1587.  
  1588.    FUNCTION
  1589.         Wait for a connection request from Palm Pilot, and accept it. If
  1590.         there was no connection until Timeout, a timeout error will be
  1591.         returned.
  1592.  
  1593.         Usually, the connection is started by pressing the HotSync button
  1594.         on the cradle.
  1595.  
  1596.         You can read the error code using PL_LastError().
  1597.  
  1598.    INPUTS
  1599.         Socket        -- (APTR) Socket
  1600.         Timeout       -- (ULONG) Timeout (seconds) until this function
  1601.                          returns.
  1602.  
  1603.    RESULT
  1604.         Success       -- (int) TRUE if a connection request has been
  1605.                          accepted.
  1606.  
  1607.    NOTE
  1608.  
  1609.    BUGS
  1610.         The timeout may be some seconds longer than provided.
  1611.  
  1612.    SEE ALSO
  1613.  
  1614. palmlink.library/PL_CloseSocket
  1615.  
  1616.    NAME
  1617.         PL_CloseSocket - close a socket to a Palm Pilot
  1618.  
  1619.    SYNOPSIS
  1620.         PL_CloseSocket(Socket)
  1621.                         A0.l
  1622.  
  1623.         void PL_CloseSocket(APTR);
  1624.  
  1625.    FUNCTION
  1626.         Close a socket to a Palm Pilot. Make sure to close all data bases
  1627.         before. PalmLink won't do this for you.
  1628.  
  1629.    INPUTS
  1630.         Socket        -- (APTR) Socket to be closed. NULL will do nothing.
  1631.  
  1632.    RESULT
  1633.  
  1634.    NOTE
  1635.  
  1636.    BUGS
  1637.  
  1638.    SEE ALSO
  1639.         PL_OpenSocket()
  1640.  
  1641.  
  1642. palmlink.library/PL_CMPAbort
  1643.  
  1644.    NAME
  1645.         PL_CMPAbort - Abort a connection
  1646.  
  1647.    SYNOPSIS
  1648.         Success = PL_CMPAbort(Socket,Reason)
  1649.         D0.l                   A0.l   D0.b
  1650.  
  1651.         int PL_CMPAbort(APTR,UBYTE);
  1652.  
  1653.    FUNCTION
  1654.         Abort a connection, using CMP (Connection Management Protocol).
  1655.         The appropriate reason is transmitted.
  1656.  
  1657.         If this function fails (i.e. it returns false), you can read
  1658.         the error code using PL_LastError().
  1659.  
  1660.         This is a low level call, and is used by the palmlink.library
  1661.         itself. Usually, you do not need to use this function.
  1662.  
  1663.    INPUTS
  1664.         Socket        -- (APTR) Socket
  1665.         Reason        -- (UBYTE) Reason for the abortion
  1666.  
  1667.    RESULT
  1668.         Success       -- (int) TRUE: The abort request has been sent
  1669.                 successfully. FALSE: An error occured.
  1670.  
  1671.    NOTE
  1672.  
  1673.    BUGS
  1674.  
  1675.    SEE ALSO
  1676.         PL_CMPRead(), PL_CMPInit(), PL_CMPWakeUp()
  1677.  
  1678.  
  1679. palmlink.library/PL_CMPInit
  1680.  
  1681.    NAME
  1682.         PL_CMPInit - Initialize a connection
  1683.  
  1684.    SYNOPSIS
  1685.         Success = PL_CMPInit(Socket,Rate)
  1686.         D0.l                  A0.l  D0.l
  1687.  
  1688.         int PL_CMPInit(APTR,ULONG);
  1689.  
  1690.    FUNCTION
  1691.         After being waked up, the connection is initialized using
  1692.         CMP (Connection Management Protocol). The desired baud rate
  1693.         is passed. It must be below the maximum baud rate that has
  1694.         been transmitted by the WakeUp packet. If the Palm Pilot does
  1695.         not support the desired rate, this function will fail.
  1696.  
  1697.         If this function fails (i.e. it returns false), you can read
  1698.         the error code using PL_LastError().
  1699.  
  1700.         This is a low level call, and is used by the palmlink.library
  1701.         itself. Usually, you do not need to use this function.
  1702.  
  1703.    INPUTS
  1704.         Socket        -- (APTR) Socket
  1705.         Rate          -- (ULONG) Desired baud rate, in bps
  1706.  
  1707.    RESULT
  1708.         Success       -- (int) TRUE: The initialization has been sent
  1709.                 successfully. FALSE: An error occured.
  1710.  
  1711.    NOTE
  1712.         It is guaranteed that the Palm Pilot supports 9600 bps. The
  1713.         maximum baud rate (at least of the Palm III) is 57600 bps.
  1714.  
  1715.         This call will not set the serial interface to the new baud
  1716.         rate!
  1717.  
  1718.    BUGS
  1719.  
  1720.    SEE ALSO
  1721.         PL_CMPRead(), PL_CMPAbort(), PL_CMPWakeUp()
  1722.  
  1723.  
  1724. palmlink.library/PL_CMPRead
  1725.  
  1726.    NAME
  1727.         PL_CMPRead - read a packet using CMP
  1728.  
  1729.    SYNOPSIS
  1730.         Success = PL_CMPRead(Socket,CMP)
  1731.         D0.l                  A0.l  A1.l
  1732.  
  1733.         int PL_CMPRead(APTR,struct PL_CMP *);
  1734.  
  1735.    FUNCTION
  1736.         Read a CMP packet from the Palm Pilot. A space for the CMP
  1737.         structure must be provided.
  1738.  
  1739.         If this function fails (i.e. it returns false), you can read
  1740.         the error code using PL_LastError().
  1741.  
  1742.         This is a low level call, and is used by the palmlink.library
  1743.         itself. Usually, you do not need to use this function.
  1744.  
  1745.    INPUTS
  1746.         Socket        -- (APTR) Socket
  1747.         CMP           -- (struct PL_CMP *) CMP structure to be filled
  1748.  
  1749.    RESULT
  1750.         Success       -- (int) TRUE: The CMP structure has been read
  1751.                 successfully. FALSE: An error occured.
  1752.  
  1753.    NOTE
  1754.  
  1755.    BUGS
  1756.  
  1757.    SEE ALSO
  1758.         PL_CMPInit(), PL_CMPAbort(), PL_CMPWakeUp()
  1759.  
  1760.  
  1761. palmlink.library/PL_CMPWakeUp
  1762.  
  1763.    NAME
  1764.         PL_CMPWakeUp - Wake up the remote side
  1765.  
  1766.    SYNOPSIS
  1767.         Success = PL_CMPWakeUp(Socket,MaxRate)
  1768.         D0.l                    A0.l   D0.l
  1769.  
  1770.         int PL_CMPWakeUp(APTR,ULONG);
  1771.  
  1772.    FUNCTION
  1773.         Wake up the remote side of a connection, using CMP (Connection
  1774.         Management Protocol). We pass the maximum baud rate we support.
  1775.         The Palm Pilot will answer with a CMP Init packet, giving the
  1776.         baud rate it will use for further communication.
  1777.  
  1778.         If this function fails (i.e. it returns false), you can read
  1779.         the error code using PL_LastError().
  1780.  
  1781.         This is a low level call, and is used by the palmlink.library
  1782.         itself. Usually, you do not need to use this function.
  1783.  
  1784.    INPUTS
  1785.         Socket        -- (APTR) Socket
  1786.         MaxRate       -- (ULONG) Maximum baud rate, in bps
  1787.  
  1788.    RESULT
  1789.         Success       -- (int) TRUE: The wake up has been sent
  1790.                 successfully. FALSE: An error occured.
  1791.  
  1792.    NOTE
  1793.         This call will not set the serial interface to the new baud
  1794.         rate!
  1795.  
  1796.    BUGS
  1797.  
  1798.    SEE ALSO
  1799.         PL_CMPRead(), PL_CMPAbort(), PL_CMPInit()
  1800.  
  1801.  
  1802. palmlink.library/PL_Connect
  1803.  
  1804.    NAME
  1805.         PL_Connect - initiate a connection to the Palm Pilot
  1806.  
  1807.    SYNOPSIS
  1808.         Success = PL_Connect(Socket)
  1809.         D0.l                  A0.l
  1810.  
  1811.         int PL_Connect(APTR);
  1812.  
  1813.    FUNCTION
  1814.         Initiate a connection to the Palm Pilot. If the connection could
  1815.         not be established, or was refused, an error occures.
  1816.  
  1817.         You can read the error code using PL_LastError().
  1818.  
  1819.    INPUTS
  1820.         Socket        -- (APTR) Socket
  1821.  
  1822.    RESULT
  1823.         Success       -- (int) TRUE if a connection has been established.
  1824.  
  1825.    NOTE
  1826.  
  1827.    BUGS
  1828.         This function does not seem to work since the Palm Pilot does not
  1829.         accept wakeup requests. I will have a look at this later. Anyhow
  1830.         you should use PL_Accept() and let the user decide when he wants
  1831.         to sync.
  1832.  
  1833.    SEE ALSO
  1834.  
  1835. palmlink.library/PL_DLPInit
  1836.  
  1837.    NAME
  1838.         PL_DLPInit - Initialize a DLP data transfer
  1839.  
  1840.    SYNOPSIS
  1841.         PL_DLPInit(Socket)
  1842.                     A0.l
  1843.  
  1844.         void PL_DLPInit(APTR);
  1845.  
  1846.    FUNCTION
  1847.         The internal DLP buffer is initialized and prepared for a
  1848.         new DLP transmission.
  1849.  
  1850.         This is a low level call, and is used by the palmlink.library
  1851.         itself. Usually, you do not need to use this function.
  1852.  
  1853.    INPUTS
  1854.         Socket        -- (APTR) Socket
  1855.  
  1856.    RESULT
  1857.  
  1858.    NOTE
  1859.         The DLP buffer has sufficient space for a whole DLP packet
  1860.         of 64KByte.
  1861.  
  1862.    BUGS
  1863.         There is no arbitration yet. Only the task that initiated the
  1864.         socket is allowed to use this function.
  1865.  
  1866.         Nested calls are not supported.
  1867.  
  1868.         You must not patch this function.
  1869.  
  1870.    SEE ALSO
  1871.         PL_DLPWriteByte(), PL_DLPWriteWord(), PL_DLPWriteLong(),
  1872.         PL_DLPWrite(), PL_DLPTstWrite(), PL_DLPSend(), PL_DLPRead()
  1873.  
  1874.  
  1875. palmlink.library/PL_DLPRead
  1876.  
  1877.    NAME
  1878.         PL_DLPRead - Read the DLP reply
  1879.  
  1880.    SYNOPSIS
  1881.         Length = PL_DLPRead(Socket,Buffer,Length)
  1882.          D0.l                A0.l   A1.l   D0.l
  1883.  
  1884.         LONG PL_DLPRead(APTR,APTR,LONG);
  1885.  
  1886.    FUNCTION
  1887.         After a command has been sent using, PL_DLPSend(), you can use
  1888.         this call to sequential read the reply. The current part is
  1889.         copied into the buffer.
  1890.  
  1891.         This is a low level call, and is used by the palmlink.library
  1892.         itself. Usually, you do not need to use this function.
  1893.  
  1894.    INPUTS
  1895.         Socket        -- (APTR) Socket
  1896.         Buffer        -- (APTR) Buffer that will contain the part of
  1897.                 the reply packet.
  1898.         Length        -- (LONG) Length of the buffer
  1899.  
  1900.    RESULT
  1901.         Length        -- (LONG) Bytes that were really read.
  1902.  
  1903.    NOTE
  1904.  
  1905.    BUGS
  1906.         Currently, the returned length always matches the buffer length,
  1907.         regardless of the number of bytes that were really available.
  1908.  
  1909.         You must not patch this function.
  1910.  
  1911.    SEE ALSO
  1912.         PL_DLPInit(), PL_DLPWriteByte(), PL_DLPWriteWord(),
  1913.         PL_DLPWriteLong(), PL_DLPWrite(), PL_DLPTstWrite(), PL_DLPSend()
  1914.  
  1915.  
  1916. palmlink.library/PL_DLPSend
  1917.  
  1918.    NAME
  1919.         PL_DLPSend - Send a command and the DLP buffer
  1920.  
  1921.    SYNOPSIS
  1922.         Length = PL_DLPSend(Socket,Cmd,Arg)
  1923.          D0.l                A0.l  D0.b D1.b
  1924.  
  1925.         LONG PL_DLPSend(APTR,UBYTE,UBYTE);
  1926.  
  1927.    FUNCTION
  1928.         The current DLP buffer is sent to the Pilot, and the provided
  1929.         command is executed. The reply packet is stored into the DLP
  1930.         buffer; its size is returned.
  1931.  
  1932.         This is a low level call, and is used by the palmlink.library
  1933.         itself. Usually, you do not need to use this function.
  1934.  
  1935.    INPUTS
  1936.         Socket        -- (APTR) Socket
  1937.         Cmd           -- (UBYTE) Command code to be executed
  1938.         Arg           -- (UBYTE) Argument to the command
  1939.  
  1940.    RESULT
  1941.         Length        -- (LONG) Length of the received reply. 0 if
  1942.                 the call succeeded but no reply was sent. -1 if the
  1943.                 call failed (see PL_LastError()).
  1944.  
  1945.    NOTE
  1946.  
  1947.    BUGS
  1948.         You must not patch this function.
  1949.  
  1950.    SEE ALSO
  1951.         PL_DLPInit(), PL_DLPWriteByte(), PL_DLPWriteWord(),
  1952.         PL_DLPWriteLong(), PL_DLPWrite(), PL_DLPTstWrite(), PL_DLPRead()
  1953.  
  1954.  
  1955. palmlink.library/PL_DLPTstWrite
  1956.  
  1957.    NAME
  1958.         PL_DLPTstWrite - Test if there is sufficient space in the DLP buffer
  1959.  
  1960.    SYNOPSIS
  1961.         Success = PL_DLPTstWrite(Socket,Length)
  1962.           D0.l                    A0.l   D0.l
  1963.  
  1964.         int PL_DLPTstWrite(APTR,LONG);
  1965.  
  1966.    FUNCTION
  1967.         It is tested if a structure with the passed size will fit into
  1968.         the current DLP buffer.
  1969.  
  1970.         This is a low level call, and is used by the palmlink.library
  1971.         itself. Usually, you do not need to use this function.
  1972.  
  1973.    INPUTS
  1974.         Socket        -- (APTR) Socket
  1975.         Length        -- (LONG) Length of the structure
  1976.  
  1977.    RESULT
  1978.         Success       -- (int) TRUE: There is enough space left
  1979.  
  1980.    NOTE
  1981.  
  1982.    BUGS
  1983.         You must not patch this function.
  1984.  
  1985.    SEE ALSO
  1986.         PL_DLPInit(), PL_DLPWriteByte(), PL_DLPWriteWord(),
  1987.         PL_DLPWriteLong(), PL_DLPWrite(), PL_DLPSend(), PL_DLPRead()
  1988.  
  1989.  
  1990. palmlink.library/PL_DLPWrite
  1991.  
  1992.    NAME
  1993.         PL_DLPWrite - Write a structure to the DLP buffer
  1994.  
  1995.    SYNOPSIS
  1996.         Length = PL_DLPWrite(Socket,Structure,Length)
  1997.          D0.l                 A0.l    A1.l     D0.l
  1998.  
  1999.         LONG PL_DLPWrite(APTR,APTR,LONG);
  2000.  
  2001.    FUNCTION
  2002.         The provided structure is added to the DLP buffer.
  2003.  
  2004.         This is a low level call, and is used by the palmlink.library
  2005.         itself. Usually, you do not need to use this function.
  2006.  
  2007.    INPUTS
  2008.         Socket        -- (APTR) Socket
  2009.         Structure     -- (APTR) Data structure to be added
  2010.         Length        -- (LONG) Length of the structure
  2011.  
  2012.    RESULT
  2013.         Length        -- (LONG) Current length of the DLP packet
  2014.  
  2015.    NOTE
  2016.  
  2017.    BUGS
  2018.         PalmLink does not check if the structure really fit into
  2019.         the remaining DLP buffer space. If you are in doubt, use
  2020.         PL_DLPTstWrite() before.
  2021.  
  2022.         You must not patch this function.
  2023.  
  2024.    SEE ALSO
  2025.         PL_DLPInit(), PL_DLPWriteByte(), PL_DLPWriteWord(),
  2026.         PL_DLPWriteLong(), PL_DLPTstWrite(), PL_DLPSend(), PL_DLPRead()
  2027.  
  2028.  
  2029. palmlink.library/PL_DLPWriteByte
  2030.  
  2031.    NAME
  2032.         PL_DLPWriteByte - Write a byte to the DLP buffer
  2033.  
  2034.    SYNOPSIS
  2035.         Length = PL_DLPWriteByte(Socket,Data)
  2036.          D0.l                     A0.l  D0.b
  2037.  
  2038.         LONG PL_DLPWriteByte(APTR,BYTE);
  2039.  
  2040.    FUNCTION
  2041.         The provided byte is added to the DLP buffer.
  2042.  
  2043.         This is a low level call, and is used by the palmlink.library
  2044.         itself. Usually, you do not need to use this function.
  2045.  
  2046.    INPUTS
  2047.         Socket        -- (APTR) Socket
  2048.         Data          -- (BYTE) Data to be added
  2049.  
  2050.    RESULT
  2051.         Length        -- (LONG) Current length of the DLP packet
  2052.  
  2053.    NOTE
  2054.  
  2055.    BUGS
  2056.         You must not patch this function.
  2057.  
  2058.    SEE ALSO
  2059.         PL_DLPInit(), PL_DLPWriteWord(), PL_DLPWriteLong(),
  2060.         PL_DLPWrite(), PL_DLPTstWrite(), PL_DLPSend(), PL_DLPRead()
  2061.  
  2062.  
  2063. palmlink.library/PL_DLPWriteLong
  2064.  
  2065.    NAME
  2066.         PL_DLPWriteLong - Write a longword to the DLP buffer
  2067.  
  2068.    SYNOPSIS
  2069.         Length = PL_DLPWriteLong(Socket,Data)
  2070.          D0.l                     A0.l  D0.l
  2071.  
  2072.         LONG PL_DLPWriteLong(APTR,LONG);
  2073.  
  2074.    FUNCTION
  2075.         The provided longword is added to the DLP buffer.
  2076.  
  2077.         This is a low level call, and is used by the palmlink.library
  2078.         itself. Usually, you do not need to use this function.
  2079.  
  2080.    INPUTS
  2081.         Socket        -- (APTR) Socket
  2082.         Data          -- (BYTE) Data to be added
  2083.  
  2084.    RESULT
  2085.         Length        -- (LONG) Current length of the DLP packet
  2086.  
  2087.    NOTE
  2088.  
  2089.    BUGS
  2090.         You must not patch this function.
  2091.  
  2092.    SEE ALSO
  2093.         PL_DLPInit(), PL_DLPWriteByte(), PL_DLPWriteWord(),
  2094.         PL_DLPWrite(), PL_DLPTstWrite(), PL_DLPSend(), PL_DLPRead()
  2095.  
  2096.  
  2097. palmlink.library/PL_DLPWriteWord
  2098.  
  2099.    NAME
  2100.         PL_DLPWriteWord - Write a word to the DLP buffer
  2101.  
  2102.    SYNOPSIS
  2103.         Length = PL_DLPWriteWord(Socket,Data)
  2104.          D0.l                     A0.l  D0.w
  2105.  
  2106.         LONG PL_DLPWriteWord(APTR,WORD);
  2107.  
  2108.    FUNCTION
  2109.         The provided word is added to the DLP buffer.
  2110.  
  2111.         This is a low level call, and is used by the palmlink.library
  2112.         itself. Usually, you do not need to use this function.
  2113.  
  2114.    INPUTS
  2115.         Socket        -- (APTR) Socket
  2116.         Data          -- (BYTE) Data to be added
  2117.  
  2118.    RESULT
  2119.         Length        -- (LONG) Current length of the DLP packet
  2120.  
  2121.    NOTE
  2122.  
  2123.    BUGS
  2124.         You must not patch this function.
  2125.  
  2126.    SEE ALSO
  2127.         PL_DLPInit(), PL_DLPWriteByte(), PL_DLPWriteLong(),
  2128.         PL_DLPWrite(), PL_DLPTstWrite(), PL_DLPSend(), PL_DLPRead()
  2129.  
  2130.  
  2131. palmlink.library/PL_Explain
  2132.  
  2133.    NAME
  2134.         PL_Explain - Explain an error code
  2135.  
  2136.    SYNOPSIS
  2137.         PL_DLPWriteWord(Error,Buffer,Length)
  2138.                          A0.l  A1.l   D0.w
  2139.  
  2140.         void PL_Explain(LONG,STRPTR,ULONG);
  2141.  
  2142.    FUNCTION
  2143.         Explains the provided error code. The explanation is copied
  2144.         into the buffer space, until Length is reached.
  2145.  
  2146.         If the error was a DOS error code, it will be explained as
  2147.         well, using dos.library.
  2148.  
  2149.    INPUTS
  2150.         Error         -- (LONG) Error code to be explained
  2151.         Buffer        -- (STRPTR) Buffer for the explanation
  2152.         Length        -- (ULONG) Maximum buffer size, including the
  2153.                 null termination.
  2154.  
  2155.    RESULT
  2156.  
  2157.    NOTE
  2158.  
  2159.    BUGS
  2160.         The error code is provided in A0, not in a data register.
  2161.         Anyhow, for compatibility reasons, this will be kept like that.
  2162.  
  2163.    SEE ALSO
  2164.  
  2165.  
  2166. palmlink.library/PL_FileAddRecord
  2167.  
  2168.    NAME
  2169.         PL_FileAddRecord - add a record to a new file
  2170.  
  2171.    SYNOPSIS
  2172.         Success = PL_FileAddRecord(FileHandle,Buffer,Size,Attr,UID)
  2173.           D0.l                         A0.l    A1.l  D0.l D1.b D2.l
  2174.  
  2175.         int PL_FileAddRecord(APTR,APTR,ULONG,UBYTE,ULONG);
  2176.  
  2177.    FUNCTION
  2178.         Write mode: add a record to the file.
  2179.  
  2180.    INPUTS
  2181.         FileHandle    -- (APTR) Handle of the file
  2182.         Buffer        -- (APTR) Buffer containing the record data.
  2183.                 This buffer will be copied and can be changed after
  2184.                 that.
  2185.         Size          -- (ULONG) Size of the record data.
  2186.         Attr          -- (UBYTE) Record attribute. The attribute consists
  2187.                 of the attribute itself (upper nibble, 0xF0) and the category
  2188.                 ID (lower nibble, 0x0F).
  2189.         UID           -- (ULONG) Record UID. Only the lower 3 bytes are used.
  2190.  
  2191.    RESULT
  2192.         Success       -- (int) TRUE: The new record has been added
  2193.                 successfully.
  2194.  
  2195.    NOTE
  2196.  
  2197.    BUGS
  2198.         Currently, there is no way to find out the reason why this function
  2199.         failed.
  2200.  
  2201.    SEE ALSO
  2202.  
  2203. palmlink.library/PL_FileAddResorce
  2204.  
  2205.    NAME
  2206.         PL_FileAddResource - add a resource to a new file
  2207.  
  2208.    SYNOPSIS
  2209.         Success = PL_FileAddResource(FileHandle,Buffer,Size,Type,ID)
  2210.           D0.l                           A0.l    A1.l  D0.l D1.l D2.w
  2211.  
  2212.         int PL_FileAddResource(APTR,APTR,ULONG,ULONG,UWORD);
  2213.  
  2214.    FUNCTION
  2215.         Write mode: add a resource to the file.
  2216.  
  2217.    INPUTS
  2218.         FileHandle    -- (APTR) Handle of the file
  2219.         Buffer        -- (APTR) Buffer containing the resource data.
  2220.                 This buffer will be copied and can be changed after
  2221.                 that.
  2222.         Size          -- (ULONG) Size of the resource data.
  2223.         Type          -- (ULONG) Resource Type
  2224.         ID            -- (UWORD) Resource ID
  2225.  
  2226.    RESULT
  2227.         Success       -- (int) TRUE: The new resource has been added
  2228.                 successfully.
  2229.  
  2230.    NOTE
  2231.  
  2232.    BUGS
  2233.         Currently, there is no way to find out the reason why this function
  2234.         failed.
  2235.  
  2236.    SEE ALSO
  2237.  
  2238. palmlink.library/PL_FileClose
  2239.  
  2240.    NAME
  2241.         PL_FileClose - close a .prc or .pdb file
  2242.  
  2243.    SYNOPSIS
  2244.         Success = PL_FileClose(FileHandle)
  2245.          D0.l                    A0.l
  2246.  
  2247.         int PL_FileClose(APTR);
  2248.  
  2249.    FUNCTION
  2250.         Close a .prc or .pdb file. If the file was openened for writing,
  2251.         it will be created on close. Thus, if the file couldn't be written,
  2252.         the error will occur here!
  2253.  
  2254.    INPUTS
  2255.         FileHandle    -- (APTR) FileHandle to close.
  2256.  
  2257.    RESULT
  2258.         Success       -- (int) TRUE: File was closed successfully
  2259.  
  2260.    NOTE
  2261.  
  2262.    BUGS
  2263.         Currently, there is no way to find out the reason why this function
  2264.         failed.
  2265.  
  2266.    SEE ALSO
  2267.  
  2268. palmlink.library/PL_FileGetAppInfo
  2269.  
  2270.    NAME
  2271.         PL_FileGetAppInfo - get the application info of this file
  2272.  
  2273.    SYNOPSIS
  2274.         AppInfo = PL_FileGetAppInfo(FileHandle,Size)
  2275.           D0.l                       A0.l      A1.l
  2276.  
  2277.         APTR PL_FileGetAppInfo(APTR,ULONG *);
  2278.  
  2279.    FUNCTION
  2280.         Read mode: Get the application info of the current file.
  2281.  
  2282.    INPUTS
  2283.         FileHandle    -- (APTR) Filehandle of the file
  2284.         Size          -- (ULONG *) The size of the AppInfo is
  2285.                 written into the referenced ULONG.
  2286.  
  2287.    RESULT
  2288.         AppInfo       -- (APTR) Application info of the file.
  2289.                 This structure is READ ONLY!
  2290.  
  2291.    NOTE
  2292.  
  2293.    BUGS
  2294.  
  2295.    SEE ALSO
  2296.  
  2297. palmlink.library/PL_FileGetDBInfo
  2298.  
  2299.    NAME
  2300.         PL_FileGetDBInfo - get the database info of this file
  2301.  
  2302.    SYNOPSIS
  2303.         DBInfo = PL_FileGetDBInfo(FileHandle)
  2304.          D0.l                        A0.l
  2305.  
  2306.         struct DLP_DBInfo *PL_FileGetDBInfo(APTR);
  2307.  
  2308.    FUNCTION
  2309.         Read mode: Get the database info of the current file.
  2310.  
  2311.    INPUTS
  2312.         FileHandle    -- (APTR) Filehandle of the file
  2313.  
  2314.    RESULT
  2315.         DBInfo        -- (struct DLP_DBInfo *) DBInfo of the file.
  2316.                 This structure is READ ONLY!
  2317.  
  2318.    NOTE
  2319.  
  2320.    BUGS
  2321.  
  2322.    SEE ALSO
  2323.  
  2324. palmlink.library/PL_FileGetSortInfo
  2325.  
  2326.    NAME
  2327.         PL_FileGetSortInfo - get the sort info of this file
  2328.  
  2329.    SYNOPSIS
  2330.         SortInfo = PL_FileGetSortInfo(FileHandle,Size)
  2331.           D0.l                         A0.l      A1.l
  2332.  
  2333.         APTR PL_FileGetSortInfo(APTR,ULONG *);
  2334.  
  2335.    FUNCTION
  2336.         Read mode: Get the sort info of the current file.
  2337.  
  2338.    INPUTS
  2339.         FileHandle    -- (APTR) Filehandle of the file
  2340.         Size          -- (ULONG *) The size of the SortInfo is
  2341.                 written into the referenced ULONG.
  2342.  
  2343.    RESULT
  2344.         SortInfo      -- (APTR) Sort info of the file.
  2345.                 This structure is READ ONLY!
  2346.  
  2347.    NOTE
  2348.  
  2349.    BUGS
  2350.  
  2351.    SEE ALSO
  2352.  
  2353. palmlink.library/PL_FileInstall
  2354.  
  2355.    NAME
  2356.         PL_FileInstall - copy a database into the Pilot
  2357.  
  2358.    SYNOPSIS
  2359.         Success = PL_FileInstall(FileHandle,Socket,CardNo)
  2360.          D0.l                       A0.l      A1.l   D0.b
  2361.  
  2362.         int PL_FileInstall(APTR,APTR,UBYTE);
  2363.  
  2364.    FUNCTION
  2365.         Copy a database from this file into the PalmPilot. The database is
  2366.         selected via the current DBInfo.
  2367.  
  2368.    INPUTS
  2369.         FileHandle    -- (APTR) FileHandle
  2370.         Socket        -- (APTR) Socket, connection to the Pilot
  2371.         CardNo        -- (UBYTE) CardNo of the database
  2372.  
  2373.    RESULT
  2374.         Success       -- (int) TRUE: All data have been written successfully
  2375.  
  2376.    NOTE
  2377.         All socket errors can be read using PL_LastError().
  2378.  
  2379.    BUGS
  2380.         Currently, there is no way to find out the reason why this function
  2381.         failed.
  2382.  
  2383.    SEE ALSO
  2384.  
  2385. palmlink.library/PL_FileMerge
  2386.  
  2387.    NAME
  2388.         PL_FileMerge - copy a database into the Pilot, keep old data
  2389.  
  2390.    SYNOPSIS
  2391.         Success = PL_FileMerge(FileHandle,Socket,CardNo)
  2392.          D0.l                    A0.l      A1.l   D0.b
  2393.  
  2394.         int PL_FileMerge(APTR,APTR,UBYTE);
  2395.  
  2396.    FUNCTION
  2397.         Copy a database from this file into the PalmPilot. All old data
  2398.         are kept, so new records are added to existing ones. The database is
  2399.         selected via the current DBInfo.
  2400.  
  2401.    INPUTS
  2402.         FileHandle    -- (APTR) FileHandle
  2403.         Socket        -- (APTR) Socket, connection to the Pilot
  2404.         CardNo        -- (UBYTE) CardNo of the database
  2405.  
  2406.    RESULT
  2407.         Success       -- (int) TRUE: All data have been merged successfully
  2408.  
  2409.    NOTE
  2410.         All socket errors can be read using PL_LastError().
  2411.  
  2412.    BUGS
  2413.         Currently, there is no way to find out the reason why this function
  2414.         failed.
  2415.  
  2416.    SEE ALSO
  2417.  
  2418. palmlink.library/PL_FileOpen
  2419.  
  2420.    NAME
  2421.         PL_FileOpen - open a .prc or .pdb file
  2422.  
  2423.    SYNOPSIS
  2424.         FileHandle = PL_FileOpen(Name,DBInfo)
  2425.           D0.l                   A0.l  A1.l
  2426.  
  2427.         APTR PL_FileOpen(STRPTR,struct DLP_DBInfo *);
  2428.  
  2429.    FUNCTION
  2430.         Open a .prc or .pdb file and grant a database like access to it.
  2431.         The file is opened for reading if no DBInfo is provided (NULL),
  2432.         else it is opened for writing.
  2433.  
  2434.    INPUTS
  2435.         Name          -- (STRPTR) Name of the DOS file
  2436.         DBInfo        -- (struct DLP_DBInfo *) Database info for the
  2437.                 file to write, or NULL for read access.
  2438.  
  2439.    RESULT
  2440.         FileHandle    -- (APTR) Filehandle for this file, or NULL if
  2441.                 an error occured.
  2442.  
  2443.    NOTE
  2444.  
  2445.    BUGS
  2446.         Currently, there is no way to find out the reason why this function
  2447.         failed.
  2448.  
  2449.    SEE ALSO
  2450.  
  2451. palmlink.library/PL_FileReadRecord
  2452.  
  2453.    NAME
  2454.         PL_FileReadRecord - read a record
  2455.  
  2456.    SYNOPSIS
  2457.         Record = PL_FileReadRecord(FileHandle,Index,Size,Attr,UID)
  2458.          D0.l                         A0.l     D0.w A1.l A2.l A3.l
  2459.  
  2460.         APTR PL_FileReadRecord(APTR,UWORD,ULONG *,UBYTE *,ULONG *);
  2461.  
  2462.    FUNCTION
  2463.         Read a record out of the file.
  2464.  
  2465.    INPUTS
  2466.         FileHandle    -- (APTR) Handle of the file
  2467.         Index         -- (UWORD) Index of the record
  2468.         Size          -- (ULONG *) The size of the record is stored into
  2469.                 this ULONG reference.
  2470.         Attr          -- (UBYTE *) The attribute of the record is stored
  2471.                 into this UBYTE reference. The attribute consists of the
  2472.                 attribute itself (upper nibble, 0xF0) and the category
  2473.                 ID (lower nibble, 0x0F).
  2474.         UID           -- (ULONG *) The UID of the record is stored into
  2475.                 this ULONG reference. Only the lower 3 bytes are used.
  2476.  
  2477.    RESULT
  2478.         Record        -- (APTR) Record data. This data is READ ONLY.
  2479.  
  2480.    NOTE
  2481.  
  2482.    BUGS
  2483.         Currently, there is no way to find out the reason why this function
  2484.         failed.
  2485.  
  2486.    SEE ALSO
  2487.  
  2488. palmlink.library/PL_FileReadRecordID
  2489.  
  2490.    NAME
  2491.         PL_FileReadRecordID - read a record by its UID
  2492.  
  2493.    SYNOPSIS
  2494.         Record = PL_FileReadRecordID(FileHandle,UID,Size,Attr,Index)
  2495.          D0.l                         A0.l     D0.l A1.l A2.l A3.l
  2496.  
  2497.         APTR PL_FileReadRecordID(APTR,ULONG,ULONG *,UBYTE *,UWORD *);
  2498.  
  2499.    FUNCTION
  2500.         Read a record out of the file, by its UID.
  2501.  
  2502.    INPUTS
  2503.         FileHandle    -- (APTR) Handle of the file
  2504.         UID           -- (ULONG) The UID of the desired record.
  2505.         Size          -- (ULONG *) The size of the record is stored into
  2506.                 this ULONG reference.
  2507.         Attr          -- (UBYTE *) The attribute of the record is stored
  2508.                 into this UBYTE reference. The attribute consists of the
  2509.                 attribute itself (upper nibble, 0xF0) and the category
  2510.                 ID (lower nibble, 0x0F).
  2511.         Index         -- (UWORD *) The index of the record is stored into
  2512.                 this UWORD reference.
  2513.  
  2514.    RESULT
  2515.         Record        -- (APTR) Record data. This data is READ ONLY.
  2516.  
  2517.    NOTE
  2518.  
  2519.    BUGS
  2520.         Currently, there is no way to find out the reason why this function
  2521.         failed.
  2522.  
  2523.    SEE ALSO
  2524.  
  2525. palmlink.library/PL_FileReadResorce
  2526.  
  2527.    NAME
  2528.         PL_FileReadResource - read a resource
  2529.  
  2530.    SYNOPSIS
  2531.         Resource = PL_FileReadResource(FileHandle,Index,Size,Type,ID)
  2532.           D0.l                            A0.l     D0.w A1.l A2.l A3.l
  2533.  
  2534.         APTR PL_FileReadResource(APTR,UWORD,ULONG *,ULONG *,UWORD *);
  2535.  
  2536.    FUNCTION
  2537.         Read a resource out of the file.
  2538.  
  2539.    INPUTS
  2540.         FileHandle    -- (APTR) Handle of the file
  2541.         Index         -- (UWORD) Index of the resource
  2542.         Size          -- (ULONG *) The size of the resource is stored into
  2543.                 this ULONG reference.
  2544.         Type          -- (ULONG *) The type of the resource is stored into
  2545.                 this ULONG reference.
  2546.         ID            -- (UWORD *) The ID of the resource is stored into
  2547.                 this UWORD reference.
  2548.  
  2549.    RESULT
  2550.         Resource      -- (APTR) Resource data. This data is READ ONLY.
  2551.  
  2552.    NOTE
  2553.  
  2554.    BUGS
  2555.         Currently, there is no way to find out the reason why this function
  2556.         failed.
  2557.  
  2558.    SEE ALSO
  2559.  
  2560. palmlink.library/PL_FileRetrieve
  2561.  
  2562.    NAME
  2563.         PL_FileRetrieve - copy a database into the file
  2564.  
  2565.    SYNOPSIS
  2566.         Success = PL_FileRetrieve(FileHandle,Socket,CardNo)
  2567.          D0.l                       A0.l      A1.l   D0.b
  2568.  
  2569.         int PL_FileRetrieve(APTR,APTR,UBYTE);
  2570.  
  2571.    FUNCTION
  2572.         Copy a database from the PalmPilot to this file. The database is
  2573.         selected via the current DBInfo.
  2574.  
  2575.    INPUTS
  2576.         FileHandle    -- (APTR) FileHandle
  2577.         Socket        -- (APTR) Socket, connection to the Pilot
  2578.         CardNo        -- (UBYTE) CardNo of the database
  2579.  
  2580.    RESULT
  2581.         Success       -- (int) TRUE: All data have been read successfully
  2582.  
  2583.    NOTE
  2584.         All socket errors can be read using PL_LastError().
  2585.  
  2586.    BUGS
  2587.         Currently, there is no way to find out the reason why this function
  2588.         failed.
  2589.  
  2590.    SEE ALSO
  2591.  
  2592. palmlink.library/PL_FileSetAppInfo
  2593.  
  2594.    NAME
  2595.         PL_FileSetAppInfo - set the application info of this file
  2596.  
  2597.    SYNOPSIS
  2598.         Success = PL_FileSetAppInfo(FileHandle,AppInfo,Length)
  2599.          D0.l                         A0.l       A1.l   D0.l
  2600.  
  2601.         int PL_FileSetAppInfo(APTR,APTR,ULONG);
  2602.  
  2603.    FUNCTION
  2604.         Write mode only: Set the application info of the current file.
  2605.  
  2606.    INPUTS
  2607.         FileHandle    -- (APTR) Filehandle of the file
  2608.         AppInfo       -- (APTR) Application info to be set
  2609.         Length        -- (ULONG) Length of the application info
  2610.  
  2611.    RESULT
  2612.         Success       -- (int) TRUE if AppInfo has been set successfully.
  2613.  
  2614.    NOTE
  2615.  
  2616.    BUGS
  2617.         Currently, there is no way to find out the reason why this function
  2618.         failed.
  2619.  
  2620.    SEE ALSO
  2621.  
  2622. palmlink.library/PL_FileSetDBInfo
  2623.  
  2624.    NAME
  2625.         PL_FileSetDBInfo - set the database info of this file
  2626.  
  2627.    SYNOPSIS
  2628.         Success = PL_FileSetDBInfo(FileHandle,DBInfo)
  2629.          D0.l                        A0.l      A1.l
  2630.  
  2631.         int PL_FileSetDBInfo(APTR,struct DLP_DBInfo *);
  2632.  
  2633.    FUNCTION
  2634.         Write mode only: Set the database info of the current file.
  2635.         If the file was openend as resource file, you must also give
  2636.         a resource DBInfo here (record files appropriately).
  2637.  
  2638.    INPUTS
  2639.         FileHandle    -- (APTR) Filehandle of the file
  2640.         DBInfo        -- (struct DLP_DBInfo *) New DBInfo for the file.
  2641.  
  2642.    RESULT
  2643.         Success       -- (int) TRUE if DBInfo has been set successfully.
  2644.  
  2645.    NOTE
  2646.  
  2647.    BUGS
  2648.         Currently, there is no way to find out the reason why this function
  2649.         failed.
  2650.  
  2651.    SEE ALSO
  2652.  
  2653. palmlink.library/PL_FileSetSortInfo
  2654.  
  2655.    NAME
  2656.         PL_FileSetSortInfo - set the sort info of this file
  2657.  
  2658.    SYNOPSIS
  2659.         Success = PL_FileSetSortInfo(FileHandle,SortInfo,Length)
  2660.          D0.l                         A0.l        A1.l    D0.l
  2661.  
  2662.         int PL_FileSetSortInfo(APTR,APTR,ULONG);
  2663.  
  2664.    FUNCTION
  2665.         Write mode only: Set the sort info of the current file.
  2666.  
  2667.    INPUTS
  2668.         FileHandle    -- (APTR) Filehandle of the file
  2669.         SortInfo      -- (APTR) Sort info to be set
  2670.         Length        -- (ULONG) Length of the sort info
  2671.  
  2672.    RESULT
  2673.         Success       -- (int) TRUE if SortInfo has been set successfully.
  2674.  
  2675.    NOTE
  2676.  
  2677.    BUGS
  2678.         Currently, there is no way to find out the reason why this function
  2679.         failed.
  2680.  
  2681.    SEE ALSO
  2682.  
  2683. palmlink.library/PL_FileUsedID
  2684.  
  2685.    NAME
  2686.         PL_FileUsedID - check if a UID is already in use
  2687.  
  2688.    SYNOPSIS
  2689.         Result = PL_FileUsedID(FileHandle,UID)
  2690.          D0.l                    A0.l     D0.l
  2691.  
  2692.         int PL_FileUsedID(APTR,ULONG);
  2693.  
  2694.    FUNCTION
  2695.         Check if a UID is already in use in this file.
  2696.  
  2697.    INPUTS
  2698.         FileHandle    -- (APTR) FileHandle
  2699.         UID           -- (ULONG) UID to be checked
  2700.  
  2701.    RESULT
  2702.         Result        -- (int) TRUE: UID is in use
  2703.  
  2704.    NOTE
  2705.  
  2706.    BUGS
  2707.  
  2708.    SEE ALSO
  2709.  
  2710. palmlink.library/PL_LastError
  2711.  
  2712.    NAME
  2713.         PL_LastError - return the last error code
  2714.  
  2715.    SYNOPSIS
  2716.         Error = PL_LastError(Socket)
  2717.         D0.l                  A0.l
  2718.  
  2719.         LONG PL_LastError(APTR);
  2720.  
  2721.    FUNCTION
  2722.         Return the code of the last error. Negative codes are PalmLink
  2723.         errors. Positive are DLP error codes. If the error code is
  2724.         PLERR_DOSERROR, you can read dos/IoErr() for the cause.
  2725.  
  2726.    INPUTS
  2727.         Socket        -- (APTR) Socket
  2728.  
  2729.    RESULT
  2730.         Error         -- (LONG) Error code, or PLERR_OKAY if no error
  2731.                          has been occured.
  2732.  
  2733.    NOTE
  2734.  
  2735.    BUGS
  2736.  
  2737.    SEE ALSO
  2738.  
  2739. palmlink.library/PL_OpenSocket
  2740.  
  2741.    NAME
  2742.         PL_OpenSocket - open a socket to a Palm Pilot
  2743.  
  2744.    SYNOPSIS
  2745.         Socket = PL_OpenSocket(TagList)
  2746.         D0.l                    A0.l
  2747.  
  2748.         APTR PL_OpenSocket(struct TagItem *);
  2749.  
  2750.         Socket = PL_OpenSocketTags(Tag1,...)
  2751.  
  2752.         APTR PL_OpenSocketTags(ULONG,...);
  2753.  
  2754.    FUNCTION
  2755.         Open a new socket to a Palm Pilot. The Pilot must be connected to
  2756.         a serial port. As default, the internal serial port is used.
  2757.  
  2758.         If the socket cannot be created, NULL is returned. You can get an
  2759.         explicit error code using the PLTAG_Error tag.
  2760.  
  2761.    INPUTS
  2762.         TagList       -- (struct TagItem *) tags with further options,
  2763.                 or NULL to use all defaults.
  2764.  
  2765.    RESULT
  2766.         Socket        -- (APTR) Pointer to a socket. You must use this
  2767.                 socket for all other functions. NULL if an error occured.
  2768.  
  2769.    TAGS
  2770.         PLTAG_ErrorPtr          -- (LONG *) If an error occured (return code
  2771.                 is NULL), the error code is written into this longword. On
  2772.                 success you will find PLERR_OKAY here.
  2773.  
  2774.         PLTAG_SerialDevice      -- (STRPTR) Name of the serial device to be
  2775.                 used. Defaults to "serial.device". I suggest to use speed
  2776.                 optimized devices, as 8n1.device, to gain maximum transfer
  2777.                 rates between Amiga and Pilot.
  2778.  
  2779.         PLTAG_SerialUnit        -- (LONG) Unit of the serial device. Defaults
  2780.                 to unit 0.
  2781.  
  2782.         PLTAG_SerialMaxRate     -- (ULONG) Maximum baud rate the device can
  2783.                 generate. Defaults to 28800, which is the maximum rate of the
  2784.                 internal serial port common to the Palm Pilot. If you use a
  2785.                 multi serial interface, or faster devices as 8n1.device, you
  2786.                 can go up to 57600.
  2787.  
  2788.         PLTAG_SerialTimeout     -- (ULONG) Time (s) that the serial receiver
  2789.                 waits for a message. If this time passed, a PLERR_TIMEOUT will
  2790.                 be produced. Defaults to 10.
  2791.  
  2792.    NOTE
  2793.  
  2794.    BUGS
  2795.  
  2796.    SEE ALSO
  2797.         PL_CloseSocket()
  2798.  
  2799. palmlink.library/PL_PADPRead
  2800.  
  2801.    NAME
  2802.         PL_PADPRead - read a packet using PADP
  2803.  
  2804.    SYNOPSIS
  2805.         Length = PL_PADPRead(Socket,Buffer,Size)
  2806.         D0.l                  A0.l   A1.l  D0.l
  2807.  
  2808.         LONG PL_PADPRead(APTR,APTR,LONG);
  2809.  
  2810.    FUNCTION
  2811.         Read a data packet from the Palm Pilot, using PADP (Packet
  2812.         Assembly Disassembly Protocol). This function returns the number
  2813.         of bytes that were received, or -1 if an error occured. You can
  2814.         read the error code using PL_LastError().
  2815.  
  2816.         This is a low level call, and is used by the palmlink.library
  2817.         itself. Usually, you do not need to use this function.
  2818.  
  2819.    INPUTS
  2820.         Socket        -- (APTR) Socket
  2821.         Buffer        -- (APTR) Data buffer space
  2822.         Size          -- (LONG) Length of buffer space
  2823.  
  2824.    RESULT
  2825.         Length        -- (LONG) Received bytes, or -1: error
  2826.  
  2827.    NOTE
  2828.  
  2829.    BUGS
  2830.  
  2831.    SEE ALSO
  2832.         PL_PADPWrite()
  2833.  
  2834.  
  2835. palmlink.library/PL_PADPWrite
  2836.  
  2837.    NAME
  2838.         PL_PADPWrite - write a PADP packet to the Palm Pilot
  2839.  
  2840.    SYNOPSIS
  2841.         Length = PL_PADPWrite(Socket,Buffer,Length,Type)
  2842.         D0.l                   A0.l   A1.l   D0.l  D1.w
  2843.  
  2844.         LONG PL_PADPWrite(APTR,APTR,LONG,UWORD);
  2845.  
  2846.    FUNCTION
  2847.         Write a data packet to the Palm Pilot. The packet is sent using
  2848.         the PADP (Packet Assembly Disassembly Protocol). This function
  2849.         returns the number of bytes sent, or -1 if an error occured. You
  2850.         can read the error code using PL_LastError().
  2851.  
  2852.         This is a low level call, and is used by the palmlink.library
  2853.         itself. Usually, you do not need to use this function.
  2854.  
  2855.    INPUTS
  2856.         Socket        -- (APTR) Socket
  2857.         Buffer        -- (APTR) Buffer of data to be transmitted
  2858.         Length        -- (LONG) Number of bytes to send
  2859.         Type          -- (UWORD) Packet type:
  2860.                 PLPADP_DATA     - A plain data packet. This is the most
  2861.                         commonly used packet type.
  2862.                 PLPADP_WAKE     - A wakeup packet. Usually only for
  2863.                         PalmLink internal use.
  2864.                 PLPADP_ACK      - An acknowledge packet. Usually generated
  2865.                         and sent by PalmLink. You don't need to generate
  2866.                         acknowledgements.
  2867.                 PLPADP_TICKLE   - A tickle packet. Used by PL_Tickle().
  2868.                 PLPADP_ABORT    - An abortion packet (PalmOS 2.0 or higher)
  2869.  
  2870.    RESULT
  2871.         Length        -- (LONG) Bytes sent, or -1: error
  2872.  
  2873.    NOTE
  2874.  
  2875.    BUGS
  2876.  
  2877.    SEE ALSO
  2878.         PL_PADPRead()
  2879.  
  2880. palmlink.library/PL_RawRead
  2881.  
  2882.    NAME
  2883.         PL_RawRead - read raw data from the serial interface
  2884.  
  2885.    SYNOPSIS
  2886.         Length = PL_RawRead(Socket,Buffer,Length)
  2887.         D0.l                 A0.l   A1.l   D0.l
  2888.  
  2889.         LONG PL_RawRead(APTR,APTR,LONG);
  2890.  
  2891.    FUNCTION
  2892.         Read raw data from the serial interface, until the buffer is
  2893.         filled or the timeout has been reached. If an error occured,
  2894.         you can use PL_LastError() to find out the cause.
  2895.  
  2896.         This is a low level call, and is used by the palmlink.library
  2897.         itself. Usually, you do not need to use this function.
  2898.  
  2899.    INPUTS
  2900.         Socket        -- (APTR) Socket
  2901.         Buffer        -- (APTR) Data buffer space
  2902.         Length        -- (LONG) Length of buffer space
  2903.  
  2904.    RESULT
  2905.         Length        -- (LONG) Number of bytes read, or 0 if an
  2906.                 error occured.
  2907.  
  2908.    NOTE
  2909.  
  2910.    BUGS
  2911.  
  2912.    SEE ALSO
  2913.         PL_RawWrite(), PL_RawSetBaud()
  2914.  
  2915.  
  2916. palmlink.library/PL_RawSetRate
  2917.  
  2918.    NAME
  2919.         PL_RawSetRate - set the serial interface baud rate
  2920.  
  2921.    SYNOPSIS
  2922.         success = PL_RawSetRate(Socket,Rate)
  2923.         D0.l                     A0.l  D0.l
  2924.  
  2925.         int PL_RawSetRate(APTR,ULONG);
  2926.  
  2927.    FUNCTION
  2928.         Sets the serial interface to the new rate. The default baud
  2929.         rate is 9600 Baud. Other (higher) baud rates are arranged between
  2930.         Amiga and Palm Pilot during initialisation, using CMP.
  2931.  
  2932.         This is a low level call, and is used by the palmlink.library
  2933.         itself. Usually, you do not need to use this function.
  2934.  
  2935.    INPUTS
  2936.         Socket        -- (APTR) Socket
  2937.         Rate          -- (ULONG) New rate in bps.
  2938.  
  2939.    RESULT
  2940.         success       -- (int) TRUE if the rate has been set success-
  2941.                 fully, FALSE on error.
  2942.  
  2943.    NOTE
  2944.  
  2945.    BUGS
  2946.  
  2947.    SEE ALSO
  2948.         PL_RawRead(), PL_RawWrite()
  2949.  
  2950.  
  2951. palmlink.library/PL_RawWrite
  2952.  
  2953.    NAME
  2954.         PL_RawWrite - write raw data to the serial interface
  2955.  
  2956.    SYNOPSIS
  2957.         Length = PL_RawWrite(Socket,Buffer,Length)
  2958.         D0.l                  A0.l   A1.l   D0.l
  2959.  
  2960.         LONG PL_RawWrite(APTR,APTR,LONG);
  2961.  
  2962.    FUNCTION
  2963.         Write raw data to the serial interface. If an error occured,
  2964.         you can use PL_LastError() to find out the cause.
  2965.  
  2966.         This is a low level call, and is used by the palmlink.library
  2967.         itself. Usually, you do not need to use this function.
  2968.  
  2969.    INPUTS
  2970.         Socket        -- (APTR) Socket
  2971.         Buffer        -- (APTR) Data buffer
  2972.         Length        -- (LONG) Length of data
  2973.  
  2974.    RESULT
  2975.         Length        -- (LONG) Number of data that were sent, or
  2976.                 0 if an error occured.
  2977.  
  2978.    NOTE
  2979.  
  2980.    BUGS
  2981.  
  2982.    SEE ALSO
  2983.         PL_RawRead(), PL_RawSetBaud()
  2984.  
  2985.  
  2986. palmlink.library/PL_Read
  2987.  
  2988.    NAME
  2989.         PL_Read - read a packet from the Palm Pilot
  2990.  
  2991.    SYNOPSIS
  2992.         Length = PL_Read(Socket,Buffer,Size)
  2993.         D0.l              A0.l   A1.l  D0.l
  2994.  
  2995.         LONG PL_Read(APTR,UBYTE *,LONG);
  2996.  
  2997.    FUNCTION
  2998.         Read a data packet from the Palm Pilot. DLP packets are received
  2999.         through the PADP layer, and require an established connection. This
  3000.         function returns the number of bytes that were received (i.e. the
  3001.         size of the packet), or -1 if an error occured. You can read the
  3002.         error code using PL_LastError().
  3003.  
  3004.    INPUTS
  3005.         Socket        -- (APTR) Socket
  3006.         Buffer        -- (UBYTE *) Data buffer space
  3007.         Size          -- (LONG) Length of buffer space
  3008.  
  3009.    RESULT
  3010.         Length        -- (LONG) Received bytes, or -1: error
  3011.  
  3012.    NOTE
  3013.         The maximum data packet size is 65536 byte.
  3014.  
  3015.    BUGS
  3016.  
  3017.    SEE ALSO
  3018.         PL_Write()
  3019.  
  3020.  
  3021. palmlink.library/PL_SLPRead
  3022.  
  3023.    NAME
  3024.         PL_SLPRead - read a packet using SLP
  3025.  
  3026.    SYNOPSIS
  3027.         Length = PL_SLPRead(Socket,Buffer,Size,Header,PADP)
  3028.         D0.l                 A0.l   A1.l  D0.l  A2.l  A3.l
  3029.  
  3030.         LONG PL_SLPRead(APTR,APTR,LONG,struct PL_SLP_Header *,struct PL_PADP_Header *);
  3031.  
  3032.    FUNCTION
  3033.         Read a data packet from the Palm Pilot, using SLP (Serial Link
  3034.         Protocol). The SLP header is returned in the space passed in
  3035.         Header. You must provide sufficient space here!
  3036.  
  3037.         Additionally, you may provide space for a PADP header, which will
  3038.         later contain the PADP header of the received packet. This is used
  3039.         by PL_PADPRead and enables to read the packet data directly to the
  3040.         destination instead into a buffer. If there is no PADP header, or
  3041.         if you don't want to read it separately, provide NULL here.
  3042.  
  3043.         This function returns the number of bytes that were received, or
  3044.         -1 if an error occured. You can read the error code using
  3045.         PL_LastError().
  3046.  
  3047.         This is a low level call, and is used by the palmlink.library
  3048.         itself. Usually, you do not need to use this function.
  3049.  
  3050.    INPUTS
  3051.         Socket        -- (APTR) Socket
  3052.         Buffer        -- (APTR) Data buffer space
  3053.         Size          -- (LONG) Length of buffer space
  3054.         Header        -- (struct PL_SLP_Header *) Pointer to a space
  3055.                 that will contain the SLP header hereafter.
  3056.         PADP          -- (struct PL_PADP_Header *) Pointer to a space
  3057.                 for the PADP header, or NULL.
  3058.  
  3059.    RESULT
  3060.         Length        -- (LONG) Received bytes, or -1: error
  3061.                 If a PADP header was provided, its size is not included
  3062.                 in this length.
  3063.  
  3064.    NOTE
  3065.  
  3066.    BUGS
  3067.         If the data buffer is not sufficient, a PLERR_CHECKSUM error will
  3068.         be produced, and the stream must be re-synchronized to the next
  3069.         packet, which could fail. So better make sure that at least 1024
  3070.         byte are available, since this is the maximum packet size that can
  3071.         be transported by SLP.
  3072.  
  3073.    SEE ALSO
  3074.         PL_SLPWrite()
  3075.  
  3076.  
  3077. palmlink.library/PL_SLPWrite
  3078.  
  3079.    NAME
  3080.         PL_SLPWrite - write a SLP packet to the Palm Pilot
  3081.  
  3082.    SYNOPSIS
  3083.         Length = PL_SLPWrite(Socket,Buffer,Length,Header,PADP)
  3084.         D0.l                  A0.l   A1.l   D0.l   A2.l  A3.l
  3085.  
  3086.         LONG PL_SLPWrite(APTR,APTR,LONG,struct PL_SLP_Header *, struct PL_PADP_Header *);
  3087.  
  3088.    FUNCTION
  3089.         Write a data packet to the Palm Pilot. The packet is sent using
  3090.         SLP (Serial Link Protocol). The provided SLP header will be wrapped
  3091.         around the packet. Some parts of the SLP header are generated by
  3092.         this call automatically (see includes).
  3093.  
  3094.         Additionally, you may provide a PADP header, which will be wrapped
  3095.         around the data packet as well. This is used by PL_PADPWrite and
  3096.         allows to send the packet data from the source buffer directly,
  3097.         without the need to copy it into a buffer first. If there is no
  3098.         PADP header, or if you don't want to send it separately, provide
  3099.         NULL here.
  3100.  
  3101.         This function returns the number of sent bytes, or -1 if an error
  3102.         occured. You can read the error code using PL_LastError().
  3103.  
  3104.         This is a low level call, and is used by the palmlink.library
  3105.         itself. Usually, you do not need to use this function.
  3106.  
  3107.    INPUTS
  3108.         Socket        -- (APTR) Socket
  3109.         Buffer        -- (APTR) Buffer of data to be transmitted
  3110.         Length        -- (LONG) Bytes to send. If a PADP header is provided,
  3111.                 do *not* add its size here.
  3112.         Header        -- (struct PL_SLP_Header *) SLP header to be
  3113.                 transmitted. Do not pass NULL here!
  3114.         PADP          -- (struct PL_PADP_Header *) PADP header to be
  3115.                 transmitted, or NULL.
  3116.  
  3117.    RESULT
  3118.         Length        -- (LONG) Bytes sent (PADP header not included),
  3119.                 or -1: error
  3120.  
  3121.    NOTE
  3122.  
  3123.    BUGS
  3124.  
  3125.    SEE ALSO
  3126.         PL_SLPRead()
  3127.  
  3128. palmlink.library/PL_Tickle
  3129.  
  3130.    NAME
  3131.         PL_Tickle - tickle the connection
  3132.  
  3133.    SYNOPSIS
  3134.         success = PL_Tickle(Socket)
  3135.         D0.l                A0.l
  3136.  
  3137.         int PL_Tickle(APTR);
  3138.  
  3139.    FUNCTION
  3140.         Tickles the Palm Pilot connection. I assume this prevents some kind
  3141.         of connection timeout. You will not need this call under normal
  3142.         circumstances.
  3143.  
  3144.    INPUTS
  3145.         Socket        -- (APTR) Socket
  3146.  
  3147.    RESULT
  3148.         success       -- (int) FALSE if an error occured. See PL_LastError()
  3149.                 to get the cause.
  3150.  
  3151.    NOTE
  3152.  
  3153.    BUGS
  3154.  
  3155.    SEE ALSO
  3156.  
  3157.  
  3158. palmlink.library/PL_Write
  3159.  
  3160.    NAME
  3161.         PL_Write - write a packet to the Palm Pilot
  3162.  
  3163.    SYNOPSIS
  3164.         Length = PL_Write(Socket,Buffer,Length)
  3165.         D0.l               A0.l   A1.l   D0.l
  3166.  
  3167.         LONG PL_Write(APTR,UBYTE *,LONG);
  3168.  
  3169.    FUNCTION
  3170.         Write a data packet to the Palm Pilot. DLP packets are sent through
  3171.         the PADP layer. This function returns the number of bytes that were
  3172.         sent, or -1 if an error occured. You can read the error code using
  3173.         PL_LastError().
  3174.  
  3175.    INPUTS
  3176.         Socket        -- (APTR) Socket
  3177.         Buffer        -- (UBYTE *) Buffer of data to be transmitted
  3178.         Length        -- (LONG) Bytes to send
  3179.  
  3180.    RESULT
  3181.         Length        -- (LONG) Bytes sent, or -1: error
  3182.  
  3183.    NOTE
  3184.         The maximum data packet size is 65536 byte.
  3185.  
  3186.    BUGS
  3187.  
  3188.    SEE ALSO
  3189.         PL_Read()
  3190.  
  3191.  
  3192.